public async Task <T> Delete(int id)
        {
            var obj = await _context.Set <T>().FindAsync(id);

            if (obj == null)
            {
                throw new NotImplementedException();
            }

            _context.Set <T>().Remove(obj);
            await _context.SaveChangesAsync();

            return(obj);
        }
 public BaseRepository(RegisterMedicalContext context)
 {
     _context = context;
     _context.Set <T>();
 }