public async Task <IActionResult> EditLot(EditLotViewModel model) { if (ModelState.IsValid && (model.FinishDate > model.PublicationDate)) { await _lotService.UpdateLotPost(model.Id, model); return(RedirectToAction("Details", new { id = model.Id })); } else { ModelState.AddModelError(string.Empty, "Лот не найден"); } return(View(model)); }