Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

One-Many and One-One relationships using LINQ to SQL

, 5 Jul 2009
One-many and one-one relationships using LINQ to SQL.
LINQtoSQL.zip
LINQtoSQL
SimpleLinqExample
App_Data
Sales.mdf
Sales_log.LDF
bin
SimpleLinqExample.dll
obj
Debug
TempPE
Properties
SimpleLinqExample.csproj.user
=== Add using System.Data.Linq.Mapping; namespace
=== For entity set we need to refer using System.Data.Linq;
=== When you define relationships you need to define primary key in both the entity classes

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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

Share

About the Author

Shivprasad koirala
Architect http://www.questpond.com
India India

I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small
E-learning company in India. We are very much active in making training videos ,
writing books and corporate trainings. Do visit my site for 
.NET, C# , design pattern , WCF , Silverlight
, LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server  training 
and Interview questions and answers


| Advertise | Privacy | Mobile
Web04 | 2.8.140921.1 | Last Updated 6 Jul 2009
Article Copyright 2009 by Shivprasad koirala
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid