Beispiel #1
0
 public override async Task <Screen?> FindAsync(params object[] id)
 {
     if (!(id[0] is int))
     {
         return(null);
     }
     return(ScreenMapper.MapFromDomain(await RepositoryDbSet.AsNoTracking().FirstOrDefaultAsync(screen => screen.Id == (int)id[0])));
 }
Beispiel #2
0
 public async Task <Screen> GetFirstAndActiveScreenAsync()
 {
     return(ScreenMapper.MapFromDomain(await RepositoryDbSet.AsNoTracking().FirstOrDefaultAsync(s => s.IsActive)));
 }