Skip to content

Instantly share code, notes, and snippets.

@debugmodedotnet
Created August 28, 2015 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save debugmodedotnet/20ed860b6ddd4877c2b1 to your computer and use it in GitHub Desktop.
Save debugmodedotnet/20ed860b6ddd4877c2b1 to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
CreateStudent();
Console.WriteLine("Student Created");
Context c = new Context();
var result = from r in c.Students.Include("StudentAddresses") select r;
foreach (var r in result)
{
Console.WriteLine(r.Name);
foreach(var a in r.StudentAddresses)
{
Console.WriteLine(a.Address);
}
}
Console.ReadKey(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment