Top "Entity-framework-core" questions

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

One-to-One relationships in Entity Framework 7 Code First

How to configure One-to-One or ZeroOrOne-to-One relationships in Entity Framework 7 Code First using Data Annotations or Fluent Api?

entity-framework ef-code-first entity-framework-core ef-fluent-api
Using Entity Framework Core 3.1 with UseInMemoryDatabase option in ServiceProvider ( Scoped lifetime )

I have migrated a web application project from .NET Core 2.1 to 3.1 (also EF Core from 2.1.1 to 3.1.0). After the migration, some …

c# unit-testing entity-framework-core dbcontext .net-core-3.1
Package X is not compatible with netstandard2.0

I created a .NET Standard v2.0 project in Visual Studio 2017 v15.3.1 and I'm unable to install "Microsoft.EntityFrameworkCore 2.0.0" package in …

visual-studio-2017 entity-framework-core .net-standard-2.0
How to seed in Entity Framework Core 3.0?

I am trying seed the database with some data, using ASP.NET CORE 3.0 and EF Core. I've created my DbContext …

c# entity-framework-core asp.net-core-3.0
Is This How to Create a Data Transfer Object (DTO) with Entity Framework Core & ASP.NET Core MVC 2.2+ and 3.0

In creating a RESTful Api with ASP.NET Core MVC 2.2 I noticed there wasn't a a DTO example like the 2014 …

c# asp.net asp.net-core entity-framework-core dto
Entity Framework Core jsonb column type

I am using Entity Framework Core with npgsql postgresql for Entity Framework Core. My question is, using migrations, how do …

c# postgresql entity-framework-core npgsql
How to isolate EF InMemory database per XUnit test

I am trying use InMemory EF7 database for my xunit repository test. But my problem is that when i try …

c# .net entity-framework-core .net-core in-memory-database
How to extend DbContext with partial class and partial OnModelCreating method in EntityFramework Core

I'm using EF Core and DatabaseFirst approach. My dbContext is created automatically by Scaffold-DbContext command. I need to add some …

c# entity-framework-core dbcontext partial partial-classes
Seed initial data in Entity Framework 7 RC 1 and ASP.NET MVC 6

It seems that in Entity Framework 7 there is no native support for seed data yet (https://github.com/aspnet/EntityFramework/…

c# entity-framework asp.net-core-mvc entity-framework-core seeding
Entity Framework Core: Update relation with Id only without extra call

I'm trying to figure out how to deal with 'Single navigation property case' described in this doc: Let's say we …

c# orm asp.net-core relationship entity-framework-core