Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am going to make simple application in mvc3,in which i want to attach a db of employees information that i can make in SQL server,So kindly suggest me a way to attach my employee db to Asp.net MVC3 Application.
thank You
Regards.
Posted
Comments
Syed Salman Raza Zaidi 23-Feb-12 5:44am    
You can do it just like you do in ASP.net web forms, save connection string in web.config
M Ali Qadir 24-Feb-12 6:11am    
In fact I am going To make a simple application in which I want that system time should be noted when ever I click on the Linked image on my home page ,it note the system time in db column timeIn How could it will be possible Please guide.
Thank you.
M Ali Qadir 24-Feb-12 6:25am    
I have this class
public DbSet<employee> Employees { get; set;
public DbSet<job> Jobs { get; set; }

And in Employee controller I have Declared the names and link these names also
var names = new List<employee>
{
new Employee{Name="Azhar ul Haq"},
new Employee{Name="Saqib jillani"},
new Employee{Name="Wisal Ahmad"},
new Employee{Name="Akhtar sb"},
new Employee{Name="M Ali Qadar"},
new Employee{Name="Miss Sadaf"}
};
return View(names);
So Ho should I command my pic link to go to db column TimeIn.
Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900