Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

0 votes
1 answer
20 views

.NET Integration Test Singleton Service instantiated twice

I am working on a .NET SQL Server based application for which I need to write Integration tests. I am using CustomWebApplicationFactory to overide DbContextFactory to use an in-memory SQLite DB in ...
ankushbbbr's user avatar
-1 votes
1 answer
19 views

Entity Framework Core : Select() - change a column name

I have the following select: var allUsers = await dbContext.AppUsers .Where(u => allUserIds.Contains(u.IdentityUsersId)) .Include(u => u.Following) .Select(u => new { ...
David Thielen's user avatar
-3 votes
1 answer
26 views

Entity Framework Core : Select() - turn an IList<> property into a joined string?

I have the following select which returns the 4 columns I want: var allUsers = await dbContext.AppUsers .Where(u => allUserIds.Contains(u.IdentityUsersId)) .Include(u => u.Following) ...
David Thielen's user avatar
0 votes
0 answers
13 views

Entity Framework Core 8.0.7 DB-first Scaffold-DbContext database with custom namespace

I'm using EF Core 8.0.7 and a database-first approach. When I'm running Scaffold-DbContext on the database with the command shown here, I'm getting semicolon after namespace and class is not any name ...
Ashish's user avatar
  • 1
0 votes
0 answers
9 views

How to add new column to existing abp table __core_EntityPropertyChange

I am using abp(aspnet boilerplate) framework. There is framework build table __core_EntityPropertyChange for auditing purpose. Since this is framework build table so I am unable to add new column to ...
Pradeep Kumar's user avatar
-3 votes
0 answers
24 views

Asking for help converting SQL query to EF Core [closed]

I have a working program that uses SQL queries to collect data. I'm working on converting it to EF Core 8. I found an online convert but the result will not compile in my C# project. Can someone ...
herba's user avatar
  • 3
0 votes
0 answers
20 views

Dynamically create Entity,DbSet,Migration file,Migrator file and Tables

I want to dynamically generate the following components based on user input properties: Entity Class: Create a C# class representing the entity with properties based on user input. DbSet: Add a DbSet ...
Guna Krishnamoorthy's user avatar
0 votes
0 answers
34 views

DbContext Identity login exception

I have a problem that I do not really know how to solve. So, here it is: Image of exception InvalidOperationException: Cannot create a DbSet for 'IdentityUserClaim' because this type is not included ...
Xaus Master's user avatar
1 vote
0 answers
32 views

How to calculate Running balance in RDLC reports?

I have an application that uses C#, Entity framework core & MySql database for tracking income & expense and i'm using RDLC for reporting. I have a transactions table for tracking income and ...
frek's user avatar
  • 15
0 votes
0 answers
24 views

create migrations in an unit test project

I have an ASP.NET Core Web API project with EF Core and a SQL Server database using the repository pattern. All works fine. I added to the solution an xUnit test project and referenced the Web API ...
derstauner's user avatar
  • 1,716
2 votes
0 answers
34 views

Can't use Entity Framework Core with Supabase (PostgresSQL)

I was trying to move my project from local to remote database. I've created an ASP.NET Core 7 Web API project. I've installed Microsoft.EntityFrameworkCore 7.0.20, Microsoft.EntityFrameworkCore.Design ...
fungaver's user avatar
0 votes
0 answers
29 views

Using EF Core ChangeTracker for Blazor Web App (Serverside)

I have a webshop running in a Blazor Web App application (server side). Everything works perfectly locally. But as soon as the application is online, it crashes every few days. This means that when I ...
M4SX5's user avatar
  • 175
1 vote
1 answer
65 views

How to do an inner join?

I have an ASP.NET Core project where I am using Entity Framework to manage database queries. I want to know how I can do an INNER JOIN between two tables with Entity Framework, in this case the user ...
Daniel Rabelo's user avatar
-1 votes
1 answer
24 views

Entity Framework Core: using non-anonymous type for outer/inner key selector

I have many "join" tables in my data model, implementing many-to-many relationships, and these are having composite primary keys, one for each side of the relationship. I have for example ...
balazska's user avatar
  • 971
0 votes
0 answers
17 views

EF Core How to select multiple rows using more than 1 specific value for each row

I have a table with columns SchoolId, SchoolYearId, and ItemId with a unique constraint across all 3. This table is fully mapped in EF Core 6. On the C# side I have a list of tuples, where each tuple ...
Emery Noel's user avatar

15 30 50 per page
1
2 3 4 5
965