- Step 1 : Create DataContext classes
- Create the new project named 'KannanBlogDemo' from Visual studio 2008 under your favirote folder.
- Right click the 'KannanBlogDemo' project and select add-->item add.
- Open Server Explorer and connect your database to be test. For an example, I have created 'KannanBlog' as database with three tables, namely PatientInformation, Facility and PrimaryLanguages. See the below snap for more information.
- Once database connected well, then we can see the tables, stored procedures, view and so on which blongs to the database. See the below snap for more information.
- Now, drag and drop the tables and stored procedures to be test into the Object Relation Designer. See the below snap for more information.
- Once we completed our drag and drops, the system will automatically create DataContext classes for each and every tables along with database name for further references as .dbml files.
- Now 'KannanBlogDemoDataContext' is ready to use.
- Step 2 : Select the record through stored procedure.