10 TIPs - To Become a Good Developer/Programmer
Why Join
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Eswar Datta
2k
115
4.9k
Entity frame work
Sep 4 2018 7:25 AM
I created stored procedure for retrieve data by Id in sql server
Create
procedure
[dbo].Retrievebyid(@ID
int
)
as
begin
select
[
Name
],
[Manufacturer],
[Model]
from
HardwareDbTable
where
AssetID=@ID
end
Now goto visual studio create project and take web-aplication in that added ADO.NET EntityModel.
And i try to call that SP but i don't know how do it.
Entities db =
new
Entities();
void
Edit()
{
str = Convert.ToInt16(Request.QueryString[
"id"
]);
db.Edit_Hwdb(ID: str);
Edit_Hwdb_Result dbb =
new
Edit_Hwdb_Result();
TextBox1.Text = dbb.AssetName;
TextBox2.Text = dbb.Manufacturer;
TextBox3.Text = dbb.Model;
}
but its not retieving any data.
Reply
Answers (
8
)
CRUD Operation Related to SQL
How to Migrate Website in Project