I would like to use a database in local application. During my research I found that SQLite and SCL Ce are the most appropriate for what I am trying to do. The most promoted ORM lately is Entity Framework 4 which unfortunately doesn't support these databases out of the box for desktop applications. What I am trying to achieve is to create database programmatically which ideally would be generated via "code first" or "model first" approach which later can be be manipulated via (CRUD) transaction. Should I go for Ling to SQL or maybe no ORM at all for better support?
Entity Framework 4.1 (Code First) fully supports SQL Server CE 4. Both are available easily via NuGet.
Related
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:
Does/will EF Core support NoSQL databases? What does "support" entail?
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.
Currently, the 2.1 EF Core roadmap doesn't show any new providers for NoSQL DBs.
(https://learn.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://learn.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.
There is an open issue on MongoDB's site about providing an officially supported EF Core provider. If this is something important to you, you can vote for it there. (note, you must sign up for an account on their site to vote)
https://jira.mongodb.org/browse/CSHARP-3837
Update:
3/31/2022 - Status was changed to Backlog
4/28/2022 - Status was changed to Needs Scope, Quarter set to
FY23Q2
6/22/2022 - Status was changed to Scoping
7/29/2022 - Quarter set to FY23Q3
1/20/2023 - Status was chagned to Backlog
I am working with sql server and entity framework in a web ASP.Net C# Project. I am working with "Database first" concept. This mean i draw my database structure from sql server management studio on my local development computer. I add fields, rename fields, add table, change type, etc in the life of my project.
What i want to do is to see what to do when i want to apply database structure changes on my production(s) server(s). Is there a way for entity framework to "detect" changes with a concept of migration versioning like in symphony doctrine ? I actually patch by hand by applying sql scripts on my production server.
Thanks
In all cases you need to do some development tasks
Depends on the entity framework model you are using,
Code first approach : then you can use the reverse engineering, you can find this extension online, you can use the Tools > Extensions and Updates to find it , or you can update your classes manually.
Model first approach: then right click inside the edmx and Update Model from database
I use Model-first with EF, and I want to have an automated gap DDL script when I change my model. With "Entity Framework Database Generation Power Pack" We had it in past, but I read that was not supported in VS2012.
Any changes about that?
For Who dont't understand this need, I would like to remmember that in production enviroments, development team dosen't have access to DB. We must create and send to production Support team, DDL deployment scripts that preserve data and all DB without any recreation.
You should have a look at Database.SetInitializer, which mainly determines what happens if there is no database present when the application is started for the first time, and migrations which can be used to update the datebase when a new application version (which requires an updated database) has been deployed. If the built-in support for migrations data aren't enough, you also have the ability to add raw SQL data to handle migrating to a new version.
I currently have an n-tier application using entity framework 4.0 and we're looking at synching the contents of database between redundant servers. Does anyone have any experience on tips on how best to approach a solution?
From an architecture point of view, you need to consider if you want to do this at the application level or the database level.
At the application level you could write to both databases any time you made a change.
At the database level you could use the replication tools build into the database that you use.
You could also use a 3rd party tool. There is also a sync framework available from Microsoft.
Well, there is similar question for Oracle, now, Postgres?
Entity Framework is designed to be database agnostic. It doesn't use any SQL Server feature, and doesn't natively support things as the Geometry features of SQL Server.
You won't be able to use any feature specific to Postgres (but you can write your Entity Framework extensions to do it, however)
But the point is: It will work.