Skip to main content

Questions tagged [entity-framework-core]

Entity Framework (EF) Core is a lightweight, extensible, and cross-platform version of the popular Entity Framework data access technology.

5 votes
2 answers
270 views

I have this code which I am upgrading to .NET 8. The intention is to sort and filter the resultset using the parameters. Right now it has a lot of if else and redundant code inside the blocks. I would ...
codeandcloud's user avatar
3 votes
1 answer
893 views

I have a table representing a class hierarchy using the TPH model. Some of those sub classes have navigation properties (collections and/or references). I'm trying to preload them as I know I will ...
Irwene's user avatar
  • 195
2 votes
0 answers
49 views

I'm playing around with an app that will need to read Hierarchy trees quickly but will seldom modify them once created. I've chosen to use HierarchyIds with Entity Framework to model the hierarchy. I ...
Luke's user avatar
  • 21
0 votes
1 answer
625 views

I am not sure of the correct way to do this. I want to separate my Entity database model from the model I use throughout my application, as it will have fields in it that I may not want added to the ...
Scottish Smile's user avatar
2 votes
0 answers
5k views

I'm trying to "optimize" the command below. In other words, to make it suit my needs using best practices. I found a lot of posts regarding the "upsert" operation and there were a ...
nop's user avatar
  • 819
0 votes
1 answer
91 views

Let's say you have a book. A book can have an author, an editor, a proof reader, or several other credits. Which credits are available should be dynamic (someone might not want to have the "proof ...
TheHvidsten's user avatar
2 votes
1 answer
2k views

I am building a .Net Core 6.0 application that uses Entity Framework. I have situation where I need to apply the filter(Where clause) based on two properties (eg: Guid? skillType, string skillName). ...
One Developer's user avatar
1 vote
1 answer
2k views

I have the SQL Products table migrated from MongoDb and I use ASP Core + MediatR. The filtering data comes from frontend ...
user2771704's user avatar
-1 votes
2 answers
158 views

I would like to share this post with the community since at first glance it is very promising. Storing flags in the database is something that I have been interested in doing for a while since it ...
jwize's user avatar
  • 199
3 votes
2 answers
233 views

Is there a way to make the following code more maintainable? ...
Kirsten's user avatar
  • 443
3 votes
1 answer
372 views

I created a SqlMonitorInterceptor that will check the execution time of queries and log errors. The main idea is to log queries in such a way that they can be easily copied into SQL Server Management ...
sDima's user avatar
  • 889
4 votes
2 answers
149 views

I have a few lines where I am trying to get a list of the 25 most popular Items sold on an E-Commerce web site. The code works but I would like hints on how to optimize it. ...
Randy's user avatar
  • 527
1 vote
2 answers
164 views

I have a Item Service that is Called from an Asp.Net Core API Controller. The query gets all items in a particular category for display on an eCommerce web site (reactjs). The controller only returns ...
Randy's user avatar
  • 527
1 vote
2 answers
760 views

I am working with C#, Npgsql, EF Core and Postgres. I ...
Emaborsa's user avatar
  • 193
0 votes
1 answer
158 views

UPDATED I have a POCO class that is populated with _context.Categories.Load(): ...
Randy's user avatar
  • 527

15 30 50 per page