Beispiel #1
0
 private async Task <IEnumerable <ActivityPerRow> > GetWellRowsAsync()
 {
     // return await _context.Activities.Where(a => Brunnar.Contains(a.Address) && a.Time >= endDate.AddDays(-2) && a.Time <= endDate).ToListAsync();
     return(await _context.ActivityPerRows.Where(a => Brunnar.Contains(a.Address))
            .Where(a => a.TimeUp >= endDate.AddDays(-2) && a.TimeUp <= endDate)
            .ToListAsync());
 }
Beispiel #2
0
 private async Task <IEnumerable <PremisesPerWellViewModel> > GetPropertiesAsync()
 {
     return(await _context.Premises
            .Include(a => a.Well)
            //.Where(a => a.Well.WellName == WellName)
            .Where(a => Brunnar.Contains(a.Well.WellName))
            .Select(a => new PremisesPerWellViewModel
     {
         WellName = a.Well.WellName,
         Property = a.Property,
         Address = a.Address
     })
            .OrderBy(a => a.WellName)
            .ToListAsync());
 }