Category "entity-framework"

Error while introducing foreign key constraint

I'm getting an error while trying to EF database update. I have 2 entities, Flight and City: public class Flight : Entity<Guid> { public Airline Air

Best practice to manage entities values and value changing events

Little introduction: we have a complex entity and overgrown business logic related to it. With various fields that we can change and fields that updates from ex

C# LINQ Filter records in child tables

I have a main table "SALES" and two secondary tables "PRODUCTS" and "SERVICES", I need to select only the records in "SALES" that contain some product or servic

EFS on AWS fargate using Terraform- Can't connected

Good day, I'm having issues connecting to my EFS module from ECS fargate. Everything is built in Terraform. Here are the relevent files: efs.tf resource "aws_ef

Entity Framework Core: one-to-one configuration

I updated the title to be more relevant. I have two objects and wish to use EF Core to map them to a database using code first. I have shortened them a bit for

How to seed data in .NET Core 6 with Entity Framework?

I know how to seed data to a database with old .NET 5.0 in startup.cs file using my Seeder class with a Seed() method creating some initial data. public void Co

.NET/EF Core - simple identity

Is it okay to do the identity without using ASP.NET Core Identity? I ask because registration for me is teaking data from user, hash password and put data with

Why does EF insert the same Guid Ids in different fileds?

I've a Page entity dependent on Investor entity as investor creates a page: public class Page { [Required, DatabaseGenerated(DatabaseGeneratedOption.Identit

Meta description is not showing on google results page - REACTJS

my meta description tag is not showing on google result page as well as favicon. my technology stack consist of - reactjs on frontend & entity framework on

Fetching data in level 3 of self-referencing / parent-child relationship

I am programming a multilevel menu / submenu in ASP.NET MVC. I have this table: Id Name ParentId ---------------------------------- 1

What is an alternative to using MutablePropertyExtensions.SetValueComparer

I recently upgraded to .Net 6 and it's seems that Microsoft has removed Microsoft.EntityFrameworkCore.MutablePropertyExtensions.SetValueComparer although nothin

Creating tables in SQL with the corresponding attributes, from an ER model

If I have an ERD: https://i.stack..com/gj3Sn.png Which I'm trying to type up in postgres SQL. How could this be done? So far i've got:

Prevent EF from creating table from subclasses

I have 2 classes; Product and Book. Book is subclass of Product. In my DbContext there is only DbSet of Product. I'm using EF Code-First approach. when EF creat

EF6 Entity framework sometimes slow query on SQL Server

We have started a new project in .NET Core. We are just starting out and we are hitting a Web API endpoint to get some reference data of 8 records. We noticed

MissingMethodException when migrating from Ef 6.2 to 6.4.4

For a .net framework 4.8 project, when I update the EF reference from 6.2 to 6.4.4 the application throw an error System.MissingMethodException: Unable find 'V

EntityFramework 5 Logging in Azure Functions

TLDR; How can we make EF5 logging into its own category instead of the category of the Azure Function? After we upgraded our Azure Functions from .NET core to .

EF core Invalid column name after reverse engineering database using EF Power Tools

I have an API using ASP.NET Core 6 & EF6 and I reverse engineered my database (SQL Server) using the EF Core Powers Tool extension. When I try to insert a P

The corresponding CLR type for entity type cannot be instantiated Table-per-type

Using EFCore 5 I've been trying to follow Microsoft tutorials to create a field in a model class that may reference two other classes. In my case, I have an abs

Relationships in Entity Framework with users from AzureAD

I'm relatively new to Microsoft solutions and I need your guidance. I'm quite certain the answer exist somewhere, but I lack key words for my searches. My stack

COULD NOT LOAD TYPE 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib'

I'm creating an ASP.NET API Core application, to handle API services, which communicate to an Oracle Database. At runtime, when the process tries to connect to