Top "Ef-core-2.0" questions

Use this tag if you have questions regarding the 2.0 version of Entity Framework for .NET Core.

Cascade deleting with EF Core

I am having a few issues with EF Core at the moment. I have some data that I need to …

c# .net-core entity-framework-core asp.net-core-2.0 ef-core-2.0
Enabling Migrations in EF core?

I'm getting started with EF Core 2.0, I have a console application targetting .NET 4.6.1 I have a very simple model class, …

c# ef-core-2.0
Is there a data annotation for unique constraint in EF Core (code first)?

I am wondering if there is a data annotation for unique constraint in Entity Framework Core 2 code first approach?

c# ef-code-first entity-framework-core ef-core-2.0
Executing Stored Procedure in Entity Framework Core 2.0

Have a scenario to execute a stored procedure and read the return value in EF Core, that returns a single …

c# asp.net-core entity-framework-core ef-core-2.0
AutoFac / .NET Core - Register DBcontext

I have a new .NET Core Web API project that has the following projects structure: API -> Business / Domain …

c# .net-core autofac ef-core-2.0
EF Core 2.0 Enums stored as string

I was able to store an enum as a string in the database. builder.Entity<Company>(eb => { …

entity-framework ef-core-2.0
Add Foreign Key Column In EF Core

I have an existing table Projects that I would like to add a UserId column to, where UserId is a …

entity-framework entity-framework-migrations ef-core-2.0
Use IEntityTypeConfiguration with a base entity

In EF Core 2.0, we have the ability to derive from IEntityTypeConfiguration for cleaner Fluent API mappings (source). How can I …

c# asp.net-core entity-framework-core ef-fluent-api ef-core-2.0
What is the replacement for hasRequired with EF core?

With Entity Framework we had HasRequired on a field. What is the alternative replacement for that with EF core? https://…

c# entity-framework ef-core-2.0
How do I correctly use EF Core with AutoMapper ProjectTo and Unions?

My Setup ASP.NET Core 2.0 EntityFrameworkCore 2.0.1 AutoMapper 6.2.2 Problem I have a project with a DTO called PersonDetail and an Entity …

automapper union asp.net-core-2.0 projection ef-core-2.0