Skip to main content

All Questions

0 votes
0 answers
67 views

No complex type created after updating the stored procedure

I have 1 stored procedure returning a complex type that was showing earlier with a suffix _Result. Then I updated the procedure and went to my .edmx file and deleted that procedure from these 3 places:...
Obraine's user avatar
  • 409
0 votes
1 answer
40 views

Capture all queries running within a timeframe

My application is inserting duplicate records and I'm trying to figure out what causes that. It could be coming from the UI application, some stored proc or a nightly SQL job. I have looked into ...
Jay's user avatar
  • 339
0 votes
0 answers
222 views

EF Core 6 Generating faulty SQL for interpolated stored procedures using SqlParameters

I have a SQL Server stored procedure with multiple parameters ALTER PROCEDURE [dbo].[BUP_BankUpload] @SPP_ProcessID uniqueidentifier, @SPP_FileName NVARCHAR(250) = '', @...
MaxTheCoder's user avatar
0 votes
1 answer
97 views

How to define a complex return type without a table?

I have a stored procedure with dynamic sql that I need to return an OBJECT_RESULT type. I am trying to build the complex type within visual studio through EF. The problem, I believe, is coming from ...
Morks's user avatar
  • 372
0 votes
2 answers
58 views

Should I convert this method's queries to Stored Procedures? [closed]

At my job the other devs have spent a lot of time converting their sql queries to stored procs. Personally, I thought it made sense since a lot of those queries were complicated and joined many tables....
Morks's user avatar
  • 372
0 votes
1 answer
1k views

Concat alias of column names and variable inside the select

I want to concat the alias I'm using in the select with a variable. Something like: DECLARE @var1 as Date set @var1 = '1/06/2021' select (column1 + column2) AS ('Values at date ' + cast(@var1 as ...
Keras-JOB's user avatar
  • 125
0 votes
0 answers
87 views

The data reader is incompatible?

I am getting this error when I'm trying to getting data with the entity framework from the stored procedure. Note: This stored procedure working fine when running it in the SQL server but throws an ...
aman jutt's user avatar
0 votes
0 answers
438 views

EF6 shows different results from stored procedure than when executed manually

I'm using a local SQL Server Express database with Windows authentication. I have this stored procedure: CREATE PROCEDURE [dbo].[sp-report-HoursPerWeek] @year int, @user nvarchar(75) AS ...
Jon Koeter's user avatar
  • 1,093
0 votes
1 answer
202 views

EF Stored Procedure. Map subquery in SELECT to List property

Please help me to map a list of values in the SELECT to a List in the model I have a query in stored procedure like this SELECT Id, CustomerName, ( ...
ProgBlogger's user avatar
0 votes
2 answers
243 views

SQL- FROM table-x WHERE table-y.field = variable. How does this get a distinct record from table-x?

I am translating SQL stored procedures into C# Entity Framework. I am comfortable with C#, but SQL is pretty new to me. In one of the Stored Procedures, it begins with select distinct, then selects a ...
jthomas's user avatar
  • 65
0 votes
2 answers
382 views

How to apply DRY principle to SELECT in SQL procedures?

I have a number of SQL Stored Procedures querying the same table with different arguments and WHERE clauses. How can I define the columns in SELECT in a single place so they are shared across all ...
Darkato's user avatar
  • 652
0 votes
1 answer
3k views

Is a DbSet required to run a stored procedure?

I have a stored procedure that returns data from a multi-table query. To do this do I need to create a DbSet for each of the tables that are involved in the query? All the examples I find that use ...
MyDisplayName's user avatar
0 votes
1 answer
450 views

Pass decimal less than 0.1 from C# to SQL - SQL Profiler Interpretation Issue

I can not pass decimal value less than 0.1 properly from C# to SQL when I pass value from C# for example decimal value 0.0033M I get 33 in SQL Profiler db.Insert(0.0033M);//SP Called from EDMX ...
Ali Jamal's user avatar
  • 1,569
0 votes
0 answers
245 views

Problem when calling stored procedure getting sql error

Im trying to call a stored procedure with entity framework that makes calls to a different server and I'm getting an error. I searched on google and it says it is probably becuase Im calling a stored ...
Pedro Lopes's user avatar
-4 votes
2 answers
2k views

Converting LINQ Expression to SQL Server stored procedure

In my Azure Mobile App's .NET back end, I need to find all rows in which a column consisting of comma delimited string contains all strings in a list. I'm using the following LINQ expression which ...
AEON's user avatar
  • 5

15 30 50 per page
1
2 3 4 5 6