Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB and Entity Framework Core 2.0

So, I've read repeatedly that EF Core will support NoSQL databases but I can't seem to find any "official" NoSQL database providers, or even a NoSQL framework in the source code. (By "find" I mean search for "nosql".)

I've had a quick look at ADO.NET (paid) and crhairr/EntityFrameworkCore.MongoDb but they are both third-party. MongoDB (the specific database I was looking into) has their own .NET driver but it doesn't seem to integrate EF Core.

Anyway, what I really want to know is:

  1. Does/will EF Core support NoSQL databases? What does "support" entail?
  2. Does/will the MongoDB .NET driver support EF Core?

The results of my research so far seem to indicate that I'm misunderstanding something and it would be great if anyone could point it out.

like image 468
Priddles Avatar asked Sep 14 '17 12:09

Priddles


People also ask

Can we use Entity Framework core with MongoDB?

There is no official MongoDb provider implementation for EF core at this time, I did not see any mention of MongoDb in the . net core 7 (the next version) roadmap as of now.

Does Entity Framework work with NoSQL database?

When you use NoSQL databases for your infrastructure data tier, you typically do not use an ORM like Entity Framework Core. Instead you use the API provided by the NoSQL engine, such as Azure Cosmos DB, MongoDB, Cassandra, RavenDB, CouchDB, or Azure Storage Tables.

Can you use EF6 with .NET Core?

You can't put an EF6 context in an ASP.NET Core project because . NET Core projects don't support all of the functionality that EF6 commands such as Enable-Migrations require.


1 Answers

Currently, the 2.1 EF Core roadmap doesn't show any new providers for NoSQL DBs. (https://docs.microsoft.com/en-us/ef/core/what-is-new/roadmap)

Yet, they are now focused for Azure Cosmos, which is a cloud DB service. In Cosmos, you can use MongoDB API. More info about the progress (https://github.com/aspnet/EntityFrameworkCore/issues/8443) and Cosmos & MongoDB( https://docs.microsoft.com/en-us/azure/cosmos-db/create-mongodb-dotnet)

For non third party MongoDB provider, it will take some time. You must understand, that .NET Core is a huge change from .NET Framework, because it now embodies the open source culture. Many libraries and tools are available and will be available without "Made by Microsoft" stamp. It's up for the community to create libraries and tools for .NET Core.

like image 104
Lukas Bobinas Avatar answered Oct 14 '22 07:10

Lukas Bobinas