public IActionResult Search(Period period) { List <Operation> filteredByDate = _operationRepository.GetAllOperations().Where(x => x.Date >= period.StartDate && x.Date <= period.EndDate).ToList(); ViewBag.StartDate = period.StartDate; ViewBag.EndDate = period.EndDate; return(View("SearchResults", filteredByDate)); }
public async Task CleanUpExpiryOperation() { var currentDate = DateTime.Now; var enumerable = await _operationRepository.GetAllOperations(); foreach (var operation in enumerable) { if (operation.ExpiryDate < currentDate) { await RemoveAction(operation.OperationId); } } }
public IActionResult Index() { var model = _operationRepository.GetAllOperations(); return(View(model)); }