Guest User

Untitled

a guest
Jun 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. public class HomeSection2
  2. {
  3. public HomeSection2()
  4. {
  5. HomeSection2Detail = new List<HomeSection2Detail>();
  6. }
  7.  
  8. public Guid ID { get; set; }
  9. public string Title { get; set; }
  10. public string Header { get; set; }
  11.  
  12. public virtual List<HomeSection2Detail> HomeSection2Detail { get; set; }
  13. }
  14.  
  15. public class HomeSection2Detail
  16. {
  17. public Guid ID { get; set; }
  18. public string Title { get; set; }
  19. public string Description { get; set; }
  20. public string Link { get; set; }
  21. public int? Sequence { get; set; }
  22.  
  23. public virtual HomeSection2 HomeSection2 { get; set; }
  24. }
  25.  
  26. var obj2detail = obj2.HomeSection2Detail.Where(w => w.ID == detail.ID).FirstOrDefault();
  27. if (obj2detail != null) { obj2.HomeSection2Detail.Remove(obj2detail); }
Add Comment
Please, Sign In to add comment