Click here to Skip to main content
13,191,638 members (61,006 online)
Rate this:
Please Sign up or sign in to vote.
I have four tables Employee_Details,Employee_Contact_Details,Department_Wise_Employee and Skill_Wise_Employee.

I have to make one model from four different table entities.
So i have to write only one CRUD operation due to which all fours table get updated.
Posted 29-Aug-12 0:09am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You can create a 'View' of all the 4 tables which will have selected fields from your 4 tables Employee_Details,Employee_Contact_Details,Department_Wise_Employee and Skill_Wise_Employee.Now create an entity model of your 'View' according to your attributes present in 'View'.For 'View' refer to following sites.[^][^]

You can write LINQ queries taking into account your entity model class corresponding to created View.Make sure that the View name in database should be same with your model entity class name.Then you can carry out CRUD operations as like as in normal entity models.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You have to maintain relationship between all the four table's.
Then you have to add a ADO.NET Entity Framework in your project.
select all the required table's from your database.

And the last one is to use LINQ to SQL query for writing CURD query's

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171017.2 | Last Updated 2 Aug 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100