public async Task <IActionResult> BookTicket(TicketDto ticketDto) { var response = await _bookApiService.AddAsync(ticketDto); if (response == null) { return(BadRequest()); } return(RedirectToAction("Index", "Home")); }
public async Task <IActionResult> Create(Book book) { if (ModelState.IsValid) { await _bookApiService.AddAsync(book); return(RedirectToAction("Index", "Book")); } ModelState.AddModelError("", "boşlukları doldurun veya eksikleri giderin."); return(View()); }