Skip to main content
Best practices
0 votes
7 replies
137 views

I'm studying C# and currently working on a blog project using SQL Server. I’m having trouble understanding a specific part of my code when things get more complex. I’ve tried to figure it out on my ...
udhfg73q0981U1N's user avatar
Advice
0 votes
7 replies
129 views

I have a list that is the result of a db query. I need to be able to query another table but filter that query based on the first list. In a perfect world I would join these two tables but they are ...
Wilock's user avatar
  • 51
0 votes
1 answer
118 views

I tried to DataSeed some data, but I got this error: SqlException: The MERGE statement conflicted with the FOREIGN KEY constraint "FK_SubCategories_Categories_CategoryId". 1st I tried to do ...
Newbie's user avatar
  • 11
0 votes
4 answers
283 views

I have the following query generated by EF: SELECT [t].[Id], [t].[ActiveStateLicenseId], [t].[AvailableDate], [t].[City], [t].[CreatedBy], [t].[CreatedOn], [t].[DateOfBirth], [t].[Email], ...
TheIronCheek's user avatar
  • 1,267
0 votes
1 answer
128 views

Let's have 3 entities with the same base class for ID's: public class EntityBase { public int Id { get; set; } } public class Company : EntityBase { public string Brand { get; set; } public ...
Pavel Foltyn's user avatar
1 vote
2 answers
98 views

I keep getting error .DrpString.Contains(dienstregelpunt)' could not be translated. I have a string[] dienstregelpunten array and a database field containng dienstregelpunten as a csv field. See ...
Joost V.'s user avatar
2 votes
1 answer
138 views

I have a list of records, by multiple UserID's. TableID UserID Status ------------------------ 1 3 3 2 4 3 3 3 4 4 4 3 5 5 4 6 ...
Sherry8212's user avatar
Tooling
0 votes
3 replies
121 views

I’m used to working with a Database First approach in C#. I design my database schema (often with MySQL Workbench) and do a forward engineering, then generate my C# models using Entity Framework’s. ...
alex_pythooon's user avatar
4 votes
2 answers
768 views

I tried adding a migration via dotnet ef migrations add InitialCreate but got the following error C:\Users\tmsta\OneDrive\source\repos\Server Default\TrevorsTempMonitorApp\TrevorsTempMonitorApp.csproj ...
Trevor Stauffer's user avatar
Advice
0 votes
2 replies
53 views

Here's a basic example from the official .NET documentation for a many-to-many relationship using EF and .NET: public class Post { public int Id { get; set; } public List<Tag> Tags { get;...
Arnaud VDR's user avatar
1 vote
4 answers
230 views

I am looking for a way to use the .Include clause of Entity Framework while avoiding duplicate code. I have a lot of classes, and every class has a method which looks something like this: query = (...
Karsten Heimer's user avatar
2 votes
1 answer
104 views

I am attempting to backport some code written with Entity Framework Core to Entity Framework 6. I've encountered an issue where EF Core can successfully instantiate a complex DTO (i.e. an object with ...
RotundChinchilla's user avatar
1 vote
1 answer
123 views

I am trying to use the InsertFromQuery() to add data to a SQL table: await cx.Users .Where(x => x.Country == "Romania") .InsertFromQueryAsync("Mailbox", mb => ...
Ginto's user avatar
  • 41
0 votes
1 answer
168 views

I have the following query being generated by EF: DECLARE @__term_0 VARCHAR(7) = 'woodrow' DECLARE @__p_1 INT = 0 DECLARE @__p_2 INT = 15 SELECT [t].[Id], [t].[City], [t].[Contact], [t].[CreatedBy], [...
TheIronCheek's user avatar
  • 1,267
1 vote
0 answers
83 views

After updating our Dotnet API from dotnet 6 to 8 the connection-attemps on AWS RDS increased significantly (see attached picture). The API is running in a docker-container. We use a MYSQL RDS instance ...
jonny's user avatar
  • 34

15 30 50 per page