c# - How to Connect to SQL Server Database and Fetch datas by Just adding ADO.NET Entity Data model ASP.NET MVC 3 -
im new asp.net mvc 3 , boss wants me remove "select/update/ delete sql query statements" , recommend me use ado.net entity question is. . how can map , fetch datas in database calling datacontext. . thanks!
- right click on project , select add new item. add new item , select "ado.net entity data model". give name , necessary things, attach db , signing credentials. after finishing .edmx file add @ project.
- open edmx file , right click on design view , select "add code generation item". add new item panel appears. panel select "ado.net dbcontext generator". give name , add it.
- crete object of dbcontext class. use dbcontex object methods insert/update/delete command job.
Comments
Post a Comment