public TEntity Create(TEntity newItem, bool shouldBeCommited = true) { _context.Set <TEntity>().Add(newItem); Commit(shouldBeCommited); return(newItem); }
public IActionResult Index() { var patients = _context.Set <Patient>() .Include(x => x.Gender) .Include(x => x.AdditionalContacts) .ThenInclude(x => x.ContactType) .ToList(); return(View()); }