Ejemplo n.º 1
0
        public TEntity Create(TEntity newItem, bool shouldBeCommited = true)
        {
            _context.Set <TEntity>().Add(newItem);
            Commit(shouldBeCommited);

            return(newItem);
        }
Ejemplo n.º 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());
        }