Hi,
i Am Facing a Problem When working Searching Operation In MVC.
i Have a "Sample" Database. Where I create a Table Like Below.
create table tblEmployee
(
ID int identity primary key,
Name nvarchar(50),
Gender nvarchar(50),
Email nvarchar(50)
)
insert into tblEmployee values('Ajay','Male','[email protected]')
insert into tblEmployee values('Ravi','Male','[email protected]')
insert into tblEmployee values('Akash','Male','[email protected]')
insert into tblEmployee values('Pooja','FeMale','[email protected]')
select * from tblEmployee
now Open a asp.net mvc 4 Project.
"MVCDemo" named.
add "Ado.Net Entity Data Model" To "Models" Folder.
name it"SampleDataModel.edmx" click "Add"
->"Generate From DataBase"-> Next->Save Entity"SampleDBContext" In Web.config file then ->"Next"->
Expand Table "Select Your Table in my Case "tblEmployee"->
and Model Namespace Give "Models"
"Finish'.
Rename table as "Employee" -> save->"Build The Solution"
Now Add "Home" Controller to Controller Folder.
"HomeController"->select "MvcController with read/ write actions and views using Entity Framework
-> Now In the Model Class-> "Employee(MVCDemo.Models")
"But I am Not Getting This Model Class"
Thats The Problem.
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Afzaal Ahmad ZeeshanPosted Jun 12, 2015, 6:37 AM
ajay pandeyPosted Jun 12, 2015, 5:26 AM
Afzaal Ahmad ZeeshanPosted Jun 12, 2015, 5:09 AM