The raw SQL uses correlated subquery for single table, any possibility to translate this with single LINQ Query? SELECT * From dbo.Products AS P1 WHERE SalePric
I want create micro service architecture solution so I add some services for my solution. All my services must have one table in my database in there models so
There is a data context: public class OurDbContext : DbContext, IOurDbContext, IDataProtectionKeyContext { public DbSet<Employee> Employees { get; set
When I use Pomelo.EntityFrameworkCore.MySql in combination with Microsoft.AspNetCore.Identity I am getting that error. Are my dependencies wrong ? Similar issue
I am unable to add the Deal entity because Buyer and Seller are referencing the same city "City1". I work with detached entities here because I receive the whol
I started to develop a .NET Core Web API application with SQL Server. I use the Windows Subsystem for Linux (I store the files in the Ubuntu s
I recently came across AddPooledDbContextFactory concept as part of my NET 5 self-education piece and am keen to implement it properly. However, I am not sure h
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