Skip to main content

All Questions

1 vote
1 answer
304 views

How to handle store procedure exception message to entity framework

How to catch the RAISEERROR or SQL 2012 - THROW exception from sql store procedure to entity framework - store procedure call ? using (Entities context = new Entities()) { IEnumerable<...
user3711357's user avatar
  • 1,645
0 votes
1 answer
61 views

Web API 2 method developed using ADO.NET is not performing well, takes 53 seconds

I am creating API for Android app using Asp.Net Web API2. There is a method which fetches members data from the table. I am sorting and listing members based on arrangements(int) and name(string). The ...
Madan Gehlot's user avatar
1 vote
0 answers
749 views

Convert entity framework code to SQL or stored procedure

I am .net developer.I am good at the .net and also EF.I write EF code but there is performance problem(here is my question:Maximizing Performance with the Entity Framework) I have performance problem ...
user1688401's user avatar
  • 1,871
1 vote
1 answer
701 views

How to find sum value of single column from multiple selected columns of stored procedure in sql

in my sql stored procedure i am selecting more column and i want to find the sum of the value of column NetAmount. only need to find sum of this column. and also the other selected column value. how ...
Salam Indianoor's user avatar
1 vote
4 answers
1k views

Fill HTML table with stored procedure SELECT statement output

I am using C# .NET MVC 4 and entity framework to execute a stored procedure. I have a query that is running in the stored procedure that looks something like: Select Column1, Column2, Column3 from ...
cfly24's user avatar
  • 1,962
0 votes
2 answers
745 views

Retrieve list/rows of values from "select" stored procedure , where stored procedure Function is auto generated from Entity Framework

How to retrieve list/rows of values from "select" stored procedure Function , where stored procedure Function is auto generated from Entity Framework I can't retrieve list of values from Stored ...
user avatar
1 vote
3 answers
2k views

Insert Into two Tables with Foreign Key relationship

In my MVC application, I have two entities called Ticket and Attachment, and when inserting a new ticket record, I also want to insert new records for attachments with the FK of previously inserted ...
Jack's user avatar
  • 1
2 votes
1 answer
8k views

How to execute a stored procedure without returning results in Entity Framework 6?

I have a stored procedure like this: CREATE PROCEDURE InsertTest(@p1 NVARCHAR(50) , @p2 INT) AS BEGIN INSERT INTO dbo.Test(Name, Code) VALUES ( N'', 0) END or other I try with this code: ...
ramin_rp's user avatar
  • 331
1 vote
1 answer
952 views

Stored procedure returns nullable int

In my procedure i am returning a int value. ALTER PROCEDURE [dbo].[GetValue] -- Add the parameters for the stored procedure here @ID int, AS BEGIN -- SET NOCOUNT ON added to prevent ...
Bruce's user avatar
  • 8,899
1 vote
4 answers
3k views

Using Stored Procedure for only delete in Entity

Here's my stored proc I want to use in my DB: ALTER PROCEDURE dbo.usp_DeleteExample @ExampleID int, @LoggedInUserID int, @SessionID int, @AppID smallint as Declare @ExampleName varchar(255) Set @...
nzondlo's user avatar
  • 4,176
0 votes
3 answers
2k views

How to use SQL Server 2008 stored procedure in asp.net mvc

I have created a simple stored procedure in SQL Server 2008 as: CREATE PROCEDURE viewPosts AS SELECT * FROM dbo.Post Now, I have no idea how to use it in controller's action, I have a database ...
user2176764's user avatar
0 votes
2 answers
186 views

Issue with return Value when calling stored procedure from EF4

I have written the following stored procedure in SQL Server 2008 : ALTER Procedure [dbo].[usp_TodayNumberOfRegisteration] ( @TodayShamsiDate nvarchar ) AS Select COUNT(csci.Id) as cc1 FROM dbo....
gwt's user avatar
  • 2,423
0 votes
1 answer
82 views

how do I select from stored procedure

I am trying to work with EF, for the first time ever. I'm not sure I fully understand EF yet. I already have a database with data in it, so I've generated my models from DB. Our current setup runs ...
Nicolai's user avatar
  • 2,915
0 votes
2 answers
597 views

Stored procedure execution in Entity Framework in SQL Server 2005

I am using MVC3 and Entity Framework for calling a stored procedure in SQL Server 2008. The procedure has no parameters and in the profiler I get the proc execution as exec sp_executesql N'...
user1403505's user avatar
  • 1,015
3 votes
1 answer
779 views

Using EF code-first while retaining stored procedures

I've started building a project using code-first in EF4.0 to build my database. I now wish to create some stored procedures in SQL Server 2008 that will work on the created data tables. However, ...
Bill's user avatar
  • 33

15 30 50 per page