Example #1
0
        public virtual async Task <T> Get(long id)
        {
            var obj = await _context.Set <T>()
                      .AsNoTracking()
                      .Where(x => x.Id == id)
                      .FirstOrDefaultAsync();

            return(obj);
        }
 protected Repository(HumanResourcesContext humanResourcesContext)
 {
     _context = humanResourcesContext;
     _dbSet   = _context.Set <T>();
 }