Top "Entity-framework-core" questions

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

Specifying ON DELETE NO ACTION in Entity Framework 7?

In Entity Framework 7 when I am trying to apply a migration I get the error Introducing FOREIGN KEY constraint 'FK_…

c# entity-framework-core
ASP - Core Migrate EF Core SQL DB on Startup

Is it possible to have my ASP Core Web API ensure the DB is migrated to the latest migration using …

c# asp.net-core entity-framework-core
How to set command timeout in aspnetcore/entityframeworkcore

The place where the command timeout is set is no longer the same as earlier versions. However, I cannot find …

c# asp.net-core entity-framework-core
What happened to AddOrUpdate in EF 7 / Core?

I'm writing a seed method using EntityFramework.Core 7.0.0-rc1-final. What happened to the AddOrUpdate method of DbSet?

entity-framework-core
Entity Framework Core: Log queries for a single db context instance

Using EF Core (or any ORM for that matter) I want to keep track of the number of queries the …

c# unit-testing logging entity-framework-core xunit
Equivalent for .HasOptional in Entity Framework Core 1 (EF7)

Consider two classes. public class File { [Key] public string Id { get; set; } public string Message_Id { get; set; } internal Message …

entity-framework asp.net-core entity-framework-core .net-core asp.net-core-1.0
How to configure an Identity column using Entity Framework Core?

How do I create an Auto increment identity column in Entity Framework Core? Obviously I can do it using fluent …

c# entity-framework-core
Entity Framework Core: How to get the Connection from the DbContext?

I am trying the new Entity Framework Core with MySQL Connector. I can get a valid DbContext and write into …

.net-core entity-framework-core
How to mock an async repository with Entity Framework Core

I'm trying to create a unit test for a class that calls into an async repository. I'm using ASP.NET …

c# unit-testing asp.net-core moq entity-framework-core
How to Add an implementation of 'IDesignTimeDbContextFactory<DataContext>' to the project in asp.net-core-2.0

Here are the list of packages which I have installed : Installed Packages I am using Entityframework core 2.0. First time I …

c# entity-framework-core asp.net-core-2.0