TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
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
Forums
Monthly Leaders
Forum guidelines
Atta Kumah
NA
167
12.3k
("SelectUserName @Name", new SqlParameter("@Name", Name))
Apr 2 2019 7:44 PM
Please i want to use below statement to get Particular User Details From Database to View without assigning String Name to a specific Name(I want to Enter, let say Kumar in a different Page and get the user Details in another Page). Please this is Homework and i am finding things difficult.
Please Humble appeal. Any answer is kindly welcome and honored
This is My Controller
public async Task<ActionResult> Index( )
{
using (var context = new UserDb())
{
string Name = " Kumar";
var Data = context.tbl_Employee.SqlQuery("SelectUserName @Name", new SqlParameter("@Name", Name)).ToList();
return View(Data);
}
}
Reply
Answers (
5
)
How to host sql for users to acces the data on the internet
How to assign value to Dropdownlist ?