I'm starting a project and I will need to use the migrations provided by Entity Framework 6.
I found that SQLite does not have support for migrations.
SQL Server CE is the better option if I need to use the code-first migrations, or do I have other choices?
Remembering, I need a self-contained database engine.
No other choices, as far as I know
Related
I need to successfully do database first connect data from postgresql to a c# project with dot net core and using entity framework core.
Am familiar with mvc with sql and entity framework full database first (in this case we use the Entity Data Model Wizard which makes things easier.
I am not familiar with EFcore, dot net Core and also postgresql.
I successfully did a code first connect data from postgresql to a c# project with dot net core and using entity framework core, and using npgsql, on a console app.
Now I need to do database first web application, and should I try to edit my existing code first console app to try database first? Or should I build a new mvc project from scratch?
Also, if I do from scratch, what will be a good sequence I try
eg 1. try entity framework core tutorial first (which uses sql and is only code first),
then2. try to see how to do database first using reverse engineering
then3. try to replace the sql with postgresql
or are there any other methods that are better?
Scaffolding works with postresql.
Create project which will have your database entities and context. Install efcore tools and npgsql for this project.
Then, inside new project try this command using cmd:
dotnet ef dbcontext scaffold "Host=localhost;Database=databaseName;Username=user;Password=password" Npgsql.EntityFrameworkCore.PostgreSQL -t table1 -t table2 -o outputFolder
You dont have to pass -t parameters if you want to scaffold whole database.
If some error happens, try --force argument.
You should be able to use this database via context created by ef core.
I'm trying to use PHINX as database query builder for SQL database. Does Phinx help only database migrations?
The document also has only about configuration and steps for migration.
https://phinx.org/
http://docs.phinx.org/en/latest/
From the documentation you posted:
Phinx is just about migrations without all the bloat of a database
ORM system or application framework
PHP has many options for ORMs, such as Redbean, Doctrine and my favorite, Eloquent (comes with Laravel)
What would be a good choice for a local database to use with Entity Framework for an WPF application that needs local database.
I dont want to use MSSQL Server cos that'd be an overkill and or MSSQL CE cos few days back I was using SQL CE 3.5 and had all sorts of issues of it not supporting server generated IDs.
I've read MS Access has issues as well. and dont want to use SQLite either.
TIA
SQL Server Express sounds a good fit to me.
What about MySQL Embedded?
You can use either EF provider by Devart (it is a part of dotConnect for MySQL Professional), or the provider integrated into MySQL Connector /NET.
Can someone tell me how can I get MS Entity Framework working with PostgreSQL.
Also: How does Entity Framewok work with Mono? Could you please suggest other similar ORM tools which would run on Mono and what is your opinion about them?
Entity framework also works with Npgsql - .Net Data Provider for Postgresql.
A tutorial on how to set it up can be found here:
http://www.npgsql.org/ef6/index.html
Devart has a product that gives entity framework support for PostgreSQL. See:
http://www.devart.com/dotconnect/postgresql/
There is a provider for mono for postgreSQL. See:
http://www.mono-project.com/PostgreSQL
Can we use same Entity Model with sql compact file which is generated by sql server database.
I need to convert the sqlserver database to sql compact file and need to know if same model can be use in application or we need to generate the model again.
Tool: VS 2008 TEAM AND C#
This is possible.
But please don't forget to change the connection string, Provider and ProviderManifestToken attributes of the generated .edmx file.
Devart Team
http://www.devart.com/dotconnect
ADO.NET data providers for Oracle, MySQL, PostgreSQL, SQLite with
Entity Framework and LINQ to SQL support