public static async Task <bool> IsOpen(Guid ID, ResturantDBContext context) { List <OpenHoursTb> openHours; openHours = context.OpenHoursTb .AsEnumerable() .Where(i => i.Lid == ID && i.Day == (int)DateTime.Today.DayOfWeek && Extentions.Between(DateTime.Now.TimeOfDay, TimeSpan.Parse(i.HourOpen), TimeSpan.Parse(i.HourClose))) .ToList(); if (openHours == null || openHours.Count == 0) { return(false); } else { return(true); } }
public IndexModel(ILogger <IndexModel> logger, ResturantDBContext context) { _context = context; _logger = logger; }
public DetailsModel(ResturantDBContext context) { _context = context; }
public IndexModel(ResturantDBContext context) { _context = context; }