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

All Questions

Tagged with
-3 votes
0 answers
22 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
1 vote
0 answers
37 views

ArgumentOutOfRangeException error while assigning OracleClob value to .NET Core string

I want to read large clob data type (2 million rows in table) from a stored procedure in an Oracle database. After reading the data and trying to assign OracleClob value field to .NET Core string type,...
Onur's user avatar
  • 23
0 votes
0 answers
34 views

Entity Framework save changes from different Task<T>

My application has two concurrent tasks: await _fileWatcherService.StartWatchingAsync(); var backgroundTask = Task.Run(() => ProcessQueueAsync(cancellationTokenSource.Token), ...
federico's user avatar
0 votes
0 answers
53 views

Binding data inside a DataGrid inside a DataGrid.RowDetailsTemplate / C# WPF

I'm learning C# and WPF for a personal project that I'll use for my job. I'm trying to create a DataGrid inside another DataGrid. Specifically, I want my first SQL query to display some data, and when ...
ZeDeRo's user avatar
  • 9
0 votes
2 answers
73 views

Why do I need to model a join table class?

I have two classes in C#: public class Student { public string Name {get; set;} public string Email {get; set;} public List<Course> Courses {get; set;} } public class Course { ...
Merlis's user avatar
  • 9
0 votes
0 answers
29 views

Error "To change the IDENTITY property of a column, the column needs to be dropped and recreated."

I'm a beginner and i am having this error when i use the update-data base, after the migration: "To change the IDENTITY property of a column, the column needs to be dropped and recreated." ...
Carolina Elias's user avatar
3 votes
1 answer
88 views

Join tables with condition that all row values are unique

I have tables Machine and Inventory. In table Machine I have last running inventory properties. In table Inventory, I have new inventory id and properties (Not yet run in machine). I have to return a ...
lawd's user avatar
  • 35
0 votes
0 answers
28 views

Use some kind of helper function In EF Select query to make subquery [duplicate]

I have several tables that handles different kinds of translations for my entities and those tables to linked via relations to other entities. I use subquery to directly access translations tables ...
user3408420's user avatar
0 votes
1 answer
79 views

String interpolation inside a formattable string in C#

I am in the process of replacing Dapper with EF Core in a project. Specifically using the new Database.SqlQuery and Database.ExecuteSql functionality with EF Core. I like how they use ...
Samuel Wahlberg's user avatar
0 votes
1 answer
45 views

How to map value objects in dapper

i have the following entity using MedRaise.Domain.Enums; namespace MedRaise.Domain.Entities; public class Appointment : Entity { private Guid _clinicId; private DateTime _date; private ...
user384884's user avatar
2 votes
0 answers
62 views

How to convert this SQL query to NHibernate IQueryable query?

I have to create a query similar to the one below to paginate a parent-child query: SELECT v.ProductId, MAX(v.Price) AS Price FROM Variant v GROUP BY v.ProductId ORDER BY Price ASC; I am using C# ...
Mehran Rezaei's user avatar
1 vote
2 answers
124 views

Multiple tables query with repository pattern

I have an ASP.NET Web API project, and have implemented repository and unitOfWork patterns. I currently have a big SQL query that I want to implement in code, it includes a lot of tables and joins. My ...
RifloSnake's user avatar
0 votes
0 answers
45 views

How to pass a specific parameter to my dataset

I have DataTable as a result of executing a stored procedure. The stored procedure is returning a number of tables, therefore Tables[0], Tables[1], etc. I'm trying to query the first table, Tables[0], ...
ichachan's user avatar
  • 649
1 vote
1 answer
57 views

Join tables based on StartsWith function

I have two tables to join. The joining condition is a column that should be like or starts with the other column, not exactly equal. How to do that in Linq? This is my function: public async Task<...
sara's user avatar
  • 135
1 vote
1 answer
97 views

How to properly manage and dispose SqlConnection with SqlCredential in EF Core using Dependency Injection?

I am working on an ASP.NET Core project where I am using SqlCredential for database authentication, provided by a SqlCredentialProvider which is designed as a singleton to ensure a single instance ...
Hao Li's user avatar
  • 26

15 30 50 per page
1
2 3 4 5
2205