Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
how to connect database in mvc razor and show data in home page. please help
I am use sql server 2008 RQ
Posted

Add connections in Web.config in the root directory of your project.
C#
<connectionstrings>
<add name="DbContext name" source="./localDb" />
</connectionstrings>
 
Share this answer
 

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