public async Task <IActionResult> About() { try { return(Ok(await _repo.CreateAsync(new CookShop { Title = "Hello", StartTime = "10", CloseTime = "20" }))); } catch (Exception ex) { return(StatusCode(500, ex)); } }
public async Task <IActionResult> CreateCookShop(CookShop item) // метод, обрабатывающий форму создания столовой { try { await _repoCS.CreateAsync(item); return(RedirectToAction("Index")); } catch (Exception ex) { return(RedirectToAction("Index")); } }