Top "Entity-framework-core" questions

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

Entering keys manually with Entity Framework

I'm trying to use Entity Framework code first for a simple database project and I run into a problem I …

c# sql asp.net entity-framework entity-framework-core
EntityTypeBuilder does not contain a definition for ToTable in EF Core

I have this sample code: using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Models; namespace MySampleNamespace { public class MyDbContext : …

entity-framework entity-framework-core
Trying to set-up Entity Framework core in .Net Standard project

I was wondering if I could set-up my EntityFrameworkCore in a .NET Standard 2.0 project easily. I was following this Tutorial …

c# entity-framework entity-framework-core .net-standard-2.0
How do you show underlying SQL query in EF Core 2.0?

At 3:15 from the end of this ".NET Core 2.0 Released!" video, Diego Vega shows a demo of new features in Entity …

c# entity-framework-core
navigation property should be virtual - not required in ef core?

As I remember in EF navigation property should be virtual: public class Blog { public int BlogId { get; set; } public string …

c# entity-framework virtual entity-framework-core navigation-properties
How can I make EF Core database first use Enums?

I'm using EF Core with database-first approach using the "Scaffold-DbContext"-command to generate my DbContext / Entities. How can I instruct …

c# entity-framework-core
ASP.NET add migration 'composite primary key error' how to use fluent API

Hello I am in the process of creating a Web Application and have already installed both the Microsoft.entityFrameworkCore and …

c# asp.net entity-framework entity-framework-core
Change the IDENTITY property of a column, the column needs to be dropped and recreated

I am using EF Core 2.1 This was my initial model definition. public class Customer //Parent { public int Id { get; set; } …

c# asp.net entity-framework entity-framework-core ef-core-2.1
Dynamically changing schema in Entity Framework Core

UPD here is the way I solved the problem. Although it's likely to be not the best one, it worked …

c# entity-framework asp.net-core database-schema entity-framework-core