public async Task <IActionResult> create(Partitura partitura) { try{ await _svc.create(partitura); return(Ok()); }catch (ApplicationException aEx) { return(BadRequest(aEx.Message)); } }
public async Task <IActionResult> Create([Bind("Id,Title,ReleaseDate,Genre,Time,Price")] Partitura partitura) { try { await _svc.create(partitura); return(RedirectToAction(nameof(Index))); } catch (ApplicationException aEx) { ViewBag.Error = aEx.Message; return(View()); } }