Skip to main content

All Questions

0 votes
0 answers
66 views

Random lag on a stored procedure using entity framework

In my application, I use stored procedure to get a list of data, the procedure take no more than 2s directly from SSMS, and using entity framework in the application, it's quite quick too. But After ...
Uranne's user avatar
  • 25
0 votes
1 answer
2k views

Why does my stored procedure return -1?

I have a stored procedure. The call to it returns -1. What does this mean? Here is the code that calls the stored procedure (auto-generated by Entity Framework): public virtual int DeleteProjectData(...
gib65's user avatar
  • 2,021
1 vote
1 answer
290 views

Entity Framework creates wrong model from stored procedure

I have a stored procedure "GET_PARTNER" like this: SELECT ... Partners.name AS 'name' -nvarchar Partners.city AS 'city' -nvarchar NULL AS 'sales' -money NULL AS 'comments' -nvarchar ....
dmdany07's user avatar
  • 167
3 votes
2 answers
162 views

Why I get -1 from stored procedure?

I use SQL Server 2012 and Entity Framework6. I created table valued parameter: CREATE TYPE IdArray AS TABLE ( Id int ); And here my stored procedure: ALTER PROCEDURE [dbo].[SP_TEST_TLP] @...
Michael's user avatar
  • 13.6k
0 votes
1 answer
178 views

Using stored procedure (dynamic tsql) in entity framework 6 MVC 5

I have stored procedure as: Create PROCEDURE DynamicReportQuery ( @startDateInput datetime = NULL, @endDateInput datetime = NULL) AS SET NOCOUNT ON; BEGIN DECLARE @cols AS NVARCHAR(MAX), @selcols ...
lonelydev101's user avatar
  • 1,921
2 votes
1 answer
554 views

Stored procedure null column shows its type as Int in an Entity Framework

I have this SELECT query in a stored procedure and in Entity Framework it shows property type int. How can I make the property type string? Here is the stored procedure: alter procedure ...
user avatar
0 votes
1 answer
295 views

How retrieve collection of objects from stored procedure which are in database connected with foreign key

From application, I'm calling stored procedure IEnumerable<ObjectA> AList = this.Context.Database.SqlQuery<A> ("EXEC [MyProcedure] @PageSize, @PageNumber, @C, @D, parameters); ...
Error's user avatar
  • 835
0 votes
1 answer
104 views

Stored procedures in EF 6.1.3

I'm new to Entity Framework and have ran into a problem. I have created a stored procedure in the DB (in SMMS) and triggering from .NET works fine. However I would like EF to feed the SP to the ...
iCediCe's user avatar
  • 1,733
1 vote
2 answers
4k views

How to map Stored Procedure with Fluent API?

I need to retrieve the value of an SQL Sequence from a stored procedure using EF Code First with Fluent API mapping. My Stored Procedure: CREATE PROCEDURE [Security].[GetHashSaltSequence] AS ...
Vinicius Gonçalves's user avatar
0 votes
1 answer
2k views

Return the result of dynamic sql in stored procedure using entity framework

I want to return the result of sql dynamic in stored procedure. This Stored Procedure is used in entity framework, when I try to create a complex type the procedure returns no columns. Is there any ...
fatys's user avatar
  • 39
0 votes
0 answers
168 views

How to use multiple variables and a table that are return from a stored procedure

How to use multiple variables and a table that are returned from a stored procedure? From what I have read these variables and table should be, being returned from the stored procedure. I am at a loss ...
TheColonel26's user avatar
  • 2,728
2 votes
1 answer
2k views

EntityFramework ExecuteStoredQuery slow compared to running the stored procedure directly

Hi I am using an entity framework object context's ExecuteStoredQuery to run a stored procedure. It has always ran fine and takes around 4 seconds. However, now it takes over 60 seconds to run the ...
Shumii's user avatar
  • 4,581
2 votes
1 answer
579 views

Strange T-SQL / LINQ Performance issue when paging

I created an application (ASP.net MVC 4) for a client. This application uses Entity Framework to query the DB (SQL Server 2012). The client asked me to create a new report for the application. This ...
Beejee's user avatar
  • 2,026
0 votes
2 answers
482 views

TransactionScope Vs stored procedure

I have a web service hosted on multiple servers, as traffic increases, race conditions arise. We're using Entity Framework and host on Azure, I've been looking into either write the queries using ...
HoBa's user avatar
  • 3,604
38 votes
10 answers
40k views

Why can't Entity Framework see my Stored Procedure's column information?

I have the following stored procedure and when I attempt to Function Import it says my Stored Procedure returns no columns. What am I missing? Any Suggestions? The Proc: ALTER PROCEDURE [healthc].[...
RodneyRoadRunner's user avatar

15 30 50 per page