I got EF tracking turned off by default on my project. I got a DB model class UserModel: public class UserModel : BaseAdminDbModel { [Key] p
This is my code: namespace MyProject.Models.Database { public class Recipe { public Guid Id { get; set; } = Guid.NewGuid(); public strin
Are there any best practices in troubleshooting enums when using with Npgsql.EntityFrameworkCore.PostgreSQL provider? It's just that I don't know where to look
I'm using automapper to map collections of incoming DTOs objects and save it all at once using Entity Framework. Everything works perfectly fine till I came acr
I'm working on a .NET Core version 2.2 app (with Angular), which uses EF Core (code first). It's been an existing project for a few years, I've cloned it about
I am working on .NET CORE 6 application along with Entity Framework CORE 7. I have class where I have written LINQ script. This is async method. I am not sure w
I use CosmosDB (Sql Core) + EFCore (3.1.10) + CosmosDb provider (3.1.10). My entity has property Id (starts with capital latter), discrimination is not turned o
We use to get the following error when we try to run add-migration. We use Entity Framework Core 2.1. System.NullReferenceException: Object reference not set to
I did default Megration with User model, added only my two custom properties. EF created standard flow of tables. And my AspNetUsers table As you can see User
Is there a way to add DbSet<TEntity> Property in DbContext class at runtime without passing through OnModelCreating ?
I've been struggling with the issue/behaviour described below for while now and can't seem to figure out what's going on. This is all based on inherited/adapted
I have a Linq query which is selecting 2 columns(that can be any 2 from all columns) dynamically based on some condition.I need to map the query result in to be
Global query filters are very handy when implementing tenant and soft deletion features. But my problem is is that when i write a query with joins, for instance
I am basically trying to implement CRUD using EntityFrameWork core and .Net core 3.1. I have an issue with my update operation where I am not able update the co
There are some times where I have a user and would like to check whether they are in the organization that owns the item they are trying to access. Let's say th
I'm trying to process DB migrations during application startup in a Azure-hosted web API. However, no matter where I try to put it, I get the exception: ObjectD
I'm using EF core TPH inheritance to model some data and I'm trying to write a query that will query across different subtypes. My current attempt at writing a
I have a problem, in database I have an object of class Catalog with 3 elements in CatalogUsers. I want to replace that list with 2 element list being the orgin
I am trying to use JSON_ARRAYAGG(JSON_OBJECT(...)) in Entity Framework Core but I don't know much how to trick Entity Framework Core to use this function with a
I had some changes in my ef context and I added new Migraions dotnet ef migrations add changed98112601 then I run the below command dotnet ef database upd