コード例 #1
0
 public async Task <IEnumerable <InterpretationDto> > GetInterpretationAsync <T>() where T : Interpretation
 {
     return(await db.Set <T>().Select(x => new InterpretationDto
     {
         Name = x.Name,
         Type = x.Type
     }).ToListAsync());
 }
コード例 #2
0
ファイル: EfRepository.cs プロジェクト: artem1833/CaloriesApp
 public virtual async Task <T> GetByIdAsync(string id)
 {
     return(await db.Set <T>().FindAsync(id));
 }