Skip to main content
0 votes
2 answers
60 views

I am writing a Web API endpoint, data comes from SQL Server, and I'm using EF Core 8.0. I have a table of products and another table that maps the product codes to product attributes (one-to-many) ...
pepr's user avatar
  • 21.1k
1 vote
0 answers
70 views

Learning EF Core, I am changing my mind on how to get the list of products with additional information (here symbolic code) -- see the loosely related (abandoned approach) at How to conditionally ...
pepr's user avatar
  • 21.1k
1 vote
1 answer
107 views

I am trying to run my database code, but I keep getting this error and I've done whatever I can think of to fix it, whether it is random posts, or chatgpt, but I can't seem to figure it out. The ...
Hockaj's user avatar
  • 11
Best practices
0 votes
4 replies
69 views

I'm building an e-commerce application with ASP.NET Core Web API using Entity Framework Core and ASP.NET Core Identity. I have a BaseEntity class that tracks audit information (who created and last ...
Jinn's user avatar
  • 1
-4 votes
2 answers
201 views

My understanding of C#'s null safety features (from C# 8.0 onwards) is that (possibly) null variables must be typed as nullable and that the compiler will statically detect any parts of the code which ...
ducksforever's user avatar
Best practices
0 votes
2 replies
68 views

I am currently developing a module for an ASP.NET Core Web API that uses EF Core to talk to MySQL. The problem is I have no idea how to make EF Core fill the entityId property. Here is the example ...
Sannnekk's user avatar
  • 103
1 vote
1 answer
93 views

I have two tables Products and CustomerProduct. I need to compose an Entity Framework Core object that returns the result based on arguments of the Web API endpoint method. The method roughly works ...
pepr's user avatar
  • 21.1k
0 votes
1 answer
108 views

I'm using EF Core 9 and I'm trying to run a migration against a copy of our production database. On our local development databases everything works, but on the production copy the migration fails ...
heaxyh's user avatar
  • 633
0 votes
1 answer
101 views

Is it possible to have a type in Entity Framework Core that doesn't create FKs to every other table that uses it? Creating the DB-Scheme from the C#-model with Add-Migration and Update-Database. For ...
Ramzi Khahil's user avatar
  • 5,106
1 vote
0 answers
53 views

I've been struggling for two days with a PostgreSQL enum type issue in Entity Framework Core. Despite all my configuration, EF Core keeps trying to send a string (`text`) to an enum column. The ...
Мирон Никитин's user avatar
0 votes
2 answers
82 views

I am trying to link a many-to-many relationship without any intermediary class in my domain. The link is SoundProfiles <-> Switches. They're both not required. The error I get is One or more ...
Yves Schelpe's user avatar
  • 3,513
0 votes
1 answer
100 views

I have a web app using code-first EF Core. One of the controllers needs to run what should be a simple query (basically SELECT TOP 1 * FROM companies WHERE id = @id; in EF terms, var data = await ...
minnmass's user avatar
  • 261
1 vote
1 answer
94 views

I'm getting this error : Unable to create a 'DbContext' of type 'AppDbContext'. The exception 'Object reference not set to an instance of an object.' was thrown while attempting to create an instance....
Eray Bal's user avatar
1 vote
1 answer
104 views

Microsoft have changed ExecuteUpdateAsync to accept non-expression setters parameter in NET 10. Now it works this way: await context.Blogs.ExecuteUpdateAsync(s => { s.SetProperty(b => b....
Stanislav Gordenko's user avatar
17 votes
4 answers
5k views

I’m trying to install the Entity Framework Core CLI tools globally using the .NET CLI command: dotnet tool install --global dotnet-ef However, the installation fails with the following error message: ...
tutte2k's user avatar
  • 391

15 30 50 per page
1
2 3 4 5
1570