Guest User

Untitled

a guest
Dec 15th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public class myClass{
  2. public int Id {get;set;}
  3. public object SomeProperty {get;set;}
  4. public List<string> ListOfStrings {get;set;}
  5. }
  6.  
  7. public class SomeEntity
  8. {
  9. public int SomeEntityID {get;set;}
  10. public string Message {get;set;}
  11. public MyClassID {get;set;}
  12. }
  13.  
  14. public class MyClass
  15. {
  16. public int MyClassID {get;set;}
  17. public object SomeProperty {get;set;}
  18. public List<SomeEntity> ListOfSomeEntity {get;set;}
  19. }
  20.  
  21. var myClass = context.MyClass.Include(c=>c.ListOfSomeEntity)
  22. .Single(c=>c.MyClassID == 1);
Add Comment
Please, Sign In to add comment