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

All Questions

Tagged with
2 votes
1 answer
132 views

Why is C# DateTime.Now/DateTime.UtcNow ahead of SQL Server's SYSUTCDATETIME()/SYSDATETIME() even though C# code executes before the SQL Query

I want to know the reason why my C# date is larger than the SQL date even though the C# code is running first and after that the SQL query, Logically the SQL date should be greater than C# date. For ...
Shivam's user avatar
  • 29
0 votes
0 answers
54 views

Model Binding Issues

**Model Binding Issues ** I'm facing model binding issues in my ASP.NET Core app. The same code works with ResourceManagement1 database but fails with RMT database, though both have identical ...
Anandhavel T's user avatar
0 votes
2 answers
64 views

Moving database contexts to library project results in "FileNotFound" exception

I have a .NET Core 7 solution EIT which had only 1 project: EIT. This project uses Entity Framework Core to model and access the database. This worked fine. Now I want to add several Windows services ...
soomon's user avatar
  • 396
0 votes
0 answers
59 views

_dbContext.Add query error: Invalid column name

I have two model classes that relate many-to-one to each other: public class AlertRule: Identity { public long RuleId { get; set; } [ForeignKey(nameof(RuleId))] public virtual SepRuleBase ...
Mohamadamin's user avatar
-2 votes
1 answer
44 views

The products chosen in form UrunStokGiris does not appear in dgvStokGiris in StokGiris form

I have created two forms StokGiris and UrunStokGiris (this one is like a sub form) on first form when you click search products the sub form opens then you are able to pick whatever you want from the ...
Ferhenk Tore's user avatar
0 votes
1 answer
791 views

Setting up connection string in .NET Aspire

Starting with the Aspire starter solution I've added the ability to reach out to an Azure SQL Server database. In my AspireSample.ApiService I have the following line in Program.cs builder....
scottrudy's user avatar
  • 1,692
0 votes
1 answer
141 views

Intermittent "Connection Timeout Expired" from an ASP.NET Core Web API to SQL Server database

Recently (in the last month) I have been getting hangs in the API and checking the logs I am seeing this: System.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout ...
matt sharp's user avatar
0 votes
0 answers
139 views

SQL Connection .Net Core and Lag

Regarding audit login logout This is correct, but not complete. It correctly identifies a useful SQL Profiler EventSubClass, that in theory identifies when pooling is working. In real life however ...
Tom McDonald's user avatar
  • 1,814
2 votes
0 answers
83 views

SqlConnection from SqlClient not being recognized when trying to connect to SQL Server from a Unity Project through Microsoft Visual Studio 2022

I am trying to connect my Unity project with a SQL Server database using VS 2022, but when typing my code, I get the following error: Error CS1069 The type name 'SqlConnection' could not be found in ...
Tat0r0's user avatar
  • 21
0 votes
0 answers
51 views

Unable to seed data with Docker

I'm trying to use docker-compose to spin up an ASP.NET Core Web API and a SQL Server instance, but I also want to seed my database when it starts up. For this, I need SQL Server to be up and running ...
ServletException's user avatar
1 vote
0 answers
96 views

Execution timeout error in ASP.NET Core Web API with EF Core

I have an ASP.NET Core Web API project using EF Core for database related operations. The database is hosted in Azure and I am using SQL Server authentication to get access to my database and for ...
Harsh Joshi's user avatar
1 vote
1 answer
514 views

SQL connection in .NET Core slow

I am working on an API project that uses the latest .NET 8 which connects to a remote database using EF Core. The initial connection to the database takes 21 seconds approximately. The same method ...
Libin Joseph's user avatar
  • 7,180
0 votes
0 answers
49 views

Sanitising or Parameterisation of table name and columns in a SqlCommand [duplicate]

I am looking to build an internal tool that allows the generation of data in a database from a GUI, of course with a parameterised query if the tables and columns are known beforehand, this is no ...
jordan t's user avatar
  • 156
0 votes
1 answer
106 views

How are database changes managed/deployed in Azure DevOps when developing Blazor applications?

When developing a Blazor application, I can generate a DbContext by adding a scaffolded item. Then, once I run Add-Migration and Update-Database, the database is generated. My question is, what is the ...
Anthony Mallgren's user avatar
1 vote
0 answers
80 views

Which query is not Buffered Internally with Split Query when MARS is disabled?

I was reading the efficient querying microsoft article and there is a part which is unclear to me: When split query is used, the resultsets of all but the last query are buffered - unless MARS (...
Alb's user avatar
  • 519

15 30 50 per page
1
2 3 4 5
46