Skip to main content

All Questions

Tagged with
0 votes
1 answer
65 views

Error in Uploading an Image to a localhost SQL server using ASP.NET Core and C#

I want to send image itself to a SQL Server on localhost (send an image from my computer to localhost using ASP.NET Core web service written in C#). I tried this in my client side: OpenFileDialog opf =...
user12235025's user avatar
0 votes
1 answer
37 views

How to select where in dataGridView C#

I using microsoft visual studio, and i have box number in datagridview as follows Box Number 4433002 4433006 4433011 I want do some sql query like "SELECT NOTE FROM TABLE WHERE BOX_NUMBER IN ...
Farrasta Khoirunnas Saum's user avatar
0 votes
0 answers
34 views

Entity Framework Core not recognising mapped user-defined function

I'm using Entity Framework Core with .NET 8 and trying to call a user-defined function from C# code. I'm following the instructions here but have a slightly different use case. Rather than having the ...
amarsha4's user avatar
  • 483
0 votes
1 answer
33 views

local sqlite locked after executing SQL query [duplicate]

i am trying to debug a very strange behavior of my application: the problem is that when the code reach the blob.UploadFileAsync i have an exception saying that the file in question is used by another ...
federico 's user avatar
0 votes
2 answers
113 views

Why isn't searching on an indexed column faster than a string comparison?

I was asked for a demonstration of how searching on an indexed column is faster than searching for a string prefix, so I created a quick test but the results were surprising and I can't see why. The ...
Mark Henderson's user avatar
2 votes
1 answer
31 views

Syntax to call a parameterized function in Entity Framework with one of the parameter being INTERVAL

I have a call in Entity Framework like this: // storageConfiguration and retentionPolicy are some models string storageId = storageConfiguration.StorageId; int retentionDays = retentionPolicy....
Bene Tleilax's user avatar
0 votes
0 answers
41 views

Overriding identity tables properties / columns in EF Core 8 has no effect

I'm overriding the IdentityRole / IdentityClaim, etc. However, I've noticed that some of these fields has no effect either in Fluent API or via attributes. Class that overrides IdentityRole<Guid>...
Deukalion's user avatar
  • 2,626
0 votes
0 answers
41 views

Trouble Determining Dependent Side in One-to-One Relationship with Entity Framework Core

I'm currently working on a project using Entity Framework Core in a .NET Core application. I'm having trouble determining the dependent side in a one-to-one relationship between the User and Account ...
changedevelopersoftware's user avatar
0 votes
1 answer
36 views

SQL query SELECT MAX return value is 9 but the total rows is 10. When the ID reaches 10 it seems it doesn't count the ID 10 [closed]

I programmatically auto increment my supplier id using max when inserting the agents becasue my supplier table consist of distributors which are manually encoded id and agent is auto increment. My ...
devChing's user avatar
1 vote
2 answers
94 views

Use @ literal in SQL command text

I want to change a password for a user in MySQL which requires @ symbol. However, C# SQL command uses that as a parameter holder and because of that the following command fails. command.CommandText = $...
Mensur's user avatar
  • 1,276
0 votes
2 answers
66 views

How do I do an inner GroupJoin on dotnet?

I'm using .NET 6 with Entity Framework. This is my situation: I have a BenefitEntity (with Name and Description properties and a relationship with BenefitCategory) and this BenefitCategory which has ...
Raso's user avatar
  • 61
1 vote
0 answers
61 views

Execute query to SQL (no compile errors)

I'm trying to clean and afterwards insert a table via OPC. (dont want to buy premium SQL server for agent). I get no compile errors... But when I trigger I get the following error: "Test_Sander&...
Sander Vanhemel's user avatar
0 votes
0 answers
40 views

the DataGridViewComboBox is not filled in

I created a database and wrote functions that should take column names from tables and put them in DataGridViewComboBoxCells. However, after running the program, no errors came out, but all ...
GHOSTof TIME's user avatar
1 vote
1 answer
51 views

Group by, count distinct SQL query to IQueryable using Linq

I am trying to translate the following SQL into IQueryable, so I can access the result and filter on different conditions, before the data is retrieved from the database, but I get an error that the ...
Max's user avatar
  • 93
0 votes
0 answers
63 views

Order table by collection value

I'm using PostgreSQL with Dapper. My situation that I have 2 tables, GamePlayCount and Game from 2 databases (difference connection string) . First thing I select the most rating game like I have ...
Choi Xong Zong's user avatar

15 30 50 per page