VIDEO
STEP by STEP
1- Open Microsoft Visual Studio 2010
2- Add New Project from menu with select File > New > Project > ASP .NET Empty Web Application from New Project window
3- Go to Solution Explorer and right-click on WebApplication1 and select Add > New Item > SQL Server Database from Add New Item window
4- Go to Solution Explorer and double-click on Database1.mdf5- Go to Server Explorer and right-click on Tables (from Database1.sdf) and select Create Table from context menu
6- Save this table as Table1 like below screen shot.
7- Go to Server Explorer and open Tables and right-click on Table1 table and select Show Table Data from context menu and add some data in rows.
8- Go to Solution Explorer and right-click on WebApplication1 and select Add > New Item > ADO.NET Entity Data Model > Generate from database > Next > select Table1 from Tables > Finish
9- Press F6 for Build Solution and TAKE A BREATH :-D10- Right-click on WebApplication1 from Solution Explorer and go to Add > New Item... > Web > WebForm > Design and select a GridView from Toolbox and drag and drop it to WebForm1
11- Select GridView Tasks from top-right corner of GridView and select Choose Data Source and select Entity > Database1Entities > Table1 and Finish.
12- Compile, Run and ENJOY :-D
PS: Hey folks, if did you have any problem please don't be hesitate to contact me or write comment here ;-)Entity Framework Tutorials
- Entity Framework with Windows Form Application and Microsoft SQL CE
- Entity Framework with ASP .NET Web Application and Microsoft SQL Server
Download
Source Codes: link
No comments:
Post a Comment