Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class ExpSections
- {
- public ExpSections()
- {
- ExpRemarks = new HashSet<ExpRemarks>();
- }
- public int ExpSectionId { get; set; }
- public int ExpMainId { get; set; }
- public string Name { get; set; }
- public string ExpertName { get; set; }
- public string ImageName { get; set; }
- public ExpMains ExpMain { get; set; }
- public ICollection<ExpRemarks> ExpRemarks { get; set; }
- }
- public partial class ExpRemarks
- {
- public int ExpRemarkId { get; set; }
- public int ExpSectionId { get; set; }
- public string Number { get; set; }
- public string Question { get; set; }
- public string Answer { get; set; }
- public string Check { get; set; }
- public ExpSections ExpSection { get; set; }
- }
- public IActionResult Method(int id)
- {
- ExpSections expSections = _bd.ExpSections.SingleOrDefault(m=>m.ExpSectionId == id);
- Console.WriteLine(expSection.ExpRemark.Count());
- _bd.ExpSections.Include(x => x.ExpRemarks)
- .SingleOrDefault(m=>m.ExpSectionId == id);
- public virtual ICollection<ExpRemarks> ExpRemarks { get; set; }
Add Comment
Please, Sign In to add comment