예제 #1
0
 public async Task <T> FindById(Guid id)
 {
     return(await _context.Set <T>().FirstOrDefaultAsync(x => x.Id == id));
 }
예제 #2
0
 public GenericRepository(SalesContext context)
 {
     _context = context;
     _dataset = context.Set <T>();
 }