Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
247 views

I have a code snippet that uses let with a where clause. private List<string> Example2() { var query1 = from c in _context.Customers let custPurchases = _context.Purchases....
Romanov Nikita's user avatar
0 votes
0 answers
43 views

When I ran a scaffold command on my NPGSQL db with the typical default format I find on the web: Scaffold-DbContext <connection-string> OutputDir Models -Force It created all my model classes ...
Trant's user avatar
  • 3,661
1 vote
1 answer
95 views

Using HotChocolate v15.1.8 with EF v9.0.7 and Mapster v7.4.0, I encounter a bug with [UseSorting] / [UseFiltering] LinQ conversions which appear invalid when applied to DDD ValueObject or EF complex ...
Rémi Lamotte's user avatar
5 votes
0 answers
224 views

I'm trying to build a minimal Api for access to a local MariaDB database and my tech is .NET 9, EF, MySql.EntityFrameworkCore, Migrations (Code First) and MariaDB (XAMPP). When I try to update ...
Ariel Poblete's user avatar
2 votes
2 answers
66 views

I have two model classes; the first contains all the fields of the table which are not multilanguage fields. public partial class Brand { public long BrandID { get; set; } public string Name { ...
pitaridis's user avatar
  • 3,055
1 vote
1 answer
118 views

I'm trying to generate a migration script for my ASP.NET Core 9 Web API. I have 2 separate database contexts, AdministrationContext and CodebookContext. CodebookContext contains only one entity, as ...
Goran Petrović's user avatar
3 votes
3 answers
122 views

How to use EF Core to manage a composite foreign key referencing a parent record whose ID is generated by a database trigger after insertion? The parent entity's ID is not available during initial ...
Lance's user avatar
  • 403
1 vote
1 answer
65 views

I have this code which uses Entity Framework to query SQL Server in my .NET 9 project: vm.LastMatch = _context.Matches .Include(i => i.HomeTeam) .ThenInclude(i => i.Venue) .Include(i ...
Matthew Warr's user avatar
-1 votes
1 answer
51 views

I'm new to ASP.NET Core 9 Web API, I'm trying to do a scaffold with a existing database and using user-secrets follow the Microsoft documentation. I created my user secret file and my keys something ...
Joanny's user avatar
  • 1
0 votes
1 answer
91 views

Visual Studio 2022 new Blazor server-side application .NET 9 I used EF Core Power Tools to import my SQL Server database as a DbContext and model classes. I used the UI in VS2022 for Add/New ...
StuartV's user avatar
  • 135
0 votes
2 answers
106 views

I have a new .NET 9 Razor page Blazor server-side project. I used EF Core Power Tools to import my database schema and generate the DbContext and model classes. I created a MetaData class for one of ...
StuartV's user avatar
  • 135
-1 votes
1 answer
95 views

I am new to EF and am trying to work out why this simple update of a Transaction record generates 9 identical select queries for the record and then the update query. (I see this debugging in the ...
Tony's user avatar
  • 48
1 vote
1 answer
454 views

I am trying to configure multiple tenants in ASP.NET Core 8 MVC project. I am using Finbuckle.MultiTenant.AspNetCore - v9.0.0 Finbuckle.MultiTenant.EntityFrameworkCore - v9.0.0 Microsoft....
Roshan's user avatar
  • 3,406
2 votes
1 answer
78 views

I have inherited an application that uses Entity Framework Core, along with a dump of its database. Unfortunately the application did not use EF migrations. To get it on track I've created a first ...
Pragmateek's user avatar
  • 13.6k
0 votes
1 answer
57 views

In Entity framework I could build a where clause as a string. For example; var whereClause = "ID > 0 and !Inactive"; pList.AddRange(MyData.Set<T>().Where(whereClause).ReduceCasts()....
Lance's user avatar
  • 403
1 vote
1 answer
58 views

I'm working with Entity Framework and configuring relationships between the ConfirmationSkill, Skill, and Qualification entities. When I create a migration, an extra foreign key QualificationId ...
LemonPotion's user avatar
0 votes
1 answer
204 views

I am facing an issue where I cant fetch an entity when using .FirstOrDefaultAsync() with a GUID as the primary key. If I fetch all entries first and then run .FirstOrDefault it works. The entity in ...
rosi97's user avatar
  • 245
1 vote
1 answer
70 views

I have a class library representing my EF Core 9 database. That library includes a NuGet package of attributes that are set on the model. It's used to configure the generation of PUML files at ...
Gargoyle's user avatar
  • 10.5k
-1 votes
2 answers
665 views

I am using DDD architecture and the following code changes the aggregate root (basically adds a comment which is an entity to the aggregate root). public sealed class AddCommentToPostCommandHandlers : ...
arman's user avatar
  • 909
0 votes
1 answer
244 views

I typically use the following interfaces for EF Core entities (.NET 9, EF Core 9): public interface IEntity where TEntity: class, new() { // Identity column. public long Id { get; set; } ...
Raheel Khan's user avatar
  • 14.8k
0 votes
1 answer
284 views

I am trying to follow DDD in a new project im working on and have run into an issue when it comes to configuring one of my ValueObjects. I have the following AggregateRoot public sealed class Event : ...
CoderK's user avatar
  • 109
0 votes
0 answers
531 views

We recently started updating our existing .NET MAUI App from .NET 8 to .NET 9. Within this process, we naturally updated all our EF Core references to EF Core 9 as well. Now, the build of the app ...
ICantSeeSharp's user avatar
0 votes
0 answers
44 views

I'm working with a MySQL table that has a composite unique constraint on two columns (column1 and column2), like this: CREATE TABLE example_table ( column1 INT, column2 INT, column3 ...
Saggy's user avatar
  • 85
5 votes
1 answer
463 views

Previously, when I used .NET 8, I could use String.Join inside the Select statement for an IQueryable, as shown in this code: var receiveTransactions = await repository.Context.Set<...
majed tello's user avatar
4 votes
2 answers
4k views

I'm working on an ASP.NET Core project using Entity Framework Core and Npgsql for PostgreSQL. I'm trying to create a DbContext to manage my database, but I'm encountering the following error when I ...
Ziad Diyaa's user avatar