public virtual async Task <T> Get(int id) { var obj = await _context.Set <T>() .AsNoTracking() .Where(x => x.Id == id) .FirstOrDefaultAsync(); return(obj); }
public virtual async Task <T> Get(long id) { var obj = await _contexte.Set <T>() .AsNoTracking() .Where(x => x.Id == id) .ToListAsync(); return(obj.FirstOrDefault()); }