Top "Entity-framework-core" questions

Entity Framework (EF) Core is an open source multi-platform ORM developed by Microsoft.

Auto-increment on partial primary key with Entity Framework Core

I have declared the following model using the EF Core fluent API: modelBuilder.Entity<Foo>() .HasKey(p => …

c# asp.net entity-framework postgresql entity-framework-core
auto create database in Entity Framework Core

My application which is being ported to .NET core will use the new EF Core with SQLite. I want to …

c# sqlite .net-core entity-framework-core
Working with SQL views in Entity Framework Core

For example, I have such model: public class Blog { public int BlogId { get; set; } public string Url { get; set; } public …

c# entity-framework entity-framework-core sql-view
dotnet ef not found in .NET Core 3

I'm following the docs in order to create an initial migration. When I execute dotnet, I get the help section, …

c# asp.net-core .net-core entity-framework-core .net-core-3.0
"Build failed" on Database First Scaffold-DbContext

I'm trying to generate classes from a database (EntityFramework's database first approach). For convenience, I'm more or less walking along …

c# entity-framework-core
EF Core Mapping EntityTypeConfiguration

In EF6 we usually able to use this way to configure the Entity. public class AccountMap : EntityTypeConfiguration<Account> { …

c# entity-framework-core
Get SQL code from an Entity Framework Core IQueryable<T>

I am using Entity Framework Core and I need to see which SQL code is being generated. In previous versions …

entity-framework-core
Can I generate script of a migration with EF code first and .net core

I'm building a MVC application with .Net Core and I need to generate the script of a migration. With EF6 …

.net entity-framework asp.net-core asp.net-core-mvc entity-framework-core
Cannot access a disposed object in ASP.NET Core when injecting DbContext

On an ASP.NET Core project I have the following on Startup: services.AddDbContext<Context>(x => x.…

c# asp.net-core entity-framework-core
Entity framework Core Update-database specific migration

I am trying to figure out how to run a specific migration from the package manager in nuget. I have …

c# entity-framework-core