I'm interested in to share these samples about different kinds of joins via LINQ. have fun!

  1.     public class Brand
  2.     {
  3.         public int Id { get; set; }
  4.         public string Name { get; set; }
  5.     }
  7.     public class Category
  8.     {
  9.         public int Id { get; set; }
  10.         public string Name { get; set; }
  11.     }...

When you are implementing many to many relation in SQL, in the case of using entity framework code fist you must use Icollection<> or Ilist<> of an entity. Imagine that you have this classes , an Author class which has a collection of books

  1.     public class Author
  2.     {
  3.         public int Id { get; set; }
  4.         public string FirstName { get; set; }
  5.         public string LastName { get; set; }
  7.   &nbs...

"Language Integrated Query (LINQ, pronounced "link") is a Microsoft .NET Framework component that adds native data querying capabilities to.NET languages, although ports exist for Java, PHP, JavaScript and ActionScript". wikipedia

Linq provides some C# standard method that you can call them by method syntax instead of query syntax in C# development environment ,very useful for retrieving information from data bases by formulating quer...