Relative Content

Tag Archive for c#.netentity-framework-core

EF core dependency injection

I’m new to DI and I ran into a problem. I’m making an Avalonia App(C#) which uses a local postgreSQL database. When registering into the app, it will concurrently check if the email and username already exist in the database, and therefore showing the according error :

Migration Error with Entityfraemwork Core

I’m trying to learn Onion Architecture with .net 8. I prepare dbcontext registration in persistance layer and add it to program.cs in presentation but I’m having an error. What is the problem, how can i solve it ?

Correct way of using .ToLookup() with an EF Core query

I’m trying to use the .ToLookup() method with an EF Core query and wondering what the best practice is when using it, should I be buffering the query into a list first, or call .ToLookup() directly on the IQueryable?