示例#1
0
        public TEntity Create(TEntity newItem, bool shouldBeCommited = true)
        {
            _context.Set <TEntity>().Add(newItem);
            Commit(shouldBeCommited);

            return(newItem);
        }
示例#2
0
        public IActionResult Index()
        {
            var patients = _context.Set <Patient>()
                           .Include(x => x.Gender)
                           .Include(x => x.AdditionalContacts)
                           .ThenInclude(x => x.ContactType)
                           .ToList();

            return(View());
        }