ajay pandey

ajay pandey

  • NA
  • 83
  • 11.6k

Searching in MVC

Jun 12 2015 3:13 AM
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.
 

Answers (3)