Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyImprovement
- {
- [Key]
- public int MyImprovementId { get; set; }
- public virtual ICollection<MyCondition> Conditions { get; set; }
- }
- public class MyCondition
- {
- [Key]
- public int MyConditionId { get; set; }
- public int? ComponentId { get; set; }
- public virtual MyComponent ConditionalMyComponent { get; set; }
- }
- public class MyComponent
- {
- [Key]
- public int ComponentId { get; set; }
- public string PDNumber { get; set; }
- }
- // Code to load the first 2 levels of objects
- MyImprovement improvement = dbx.MyImprovements
- .Include("Conditions")
- .Where(x => x.ImprovementId == id)
- .First();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement