Beispiel #1
0
        public async Task <IActionResult> Edit(Guid id, EditBand model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    await _service.UpdateBand(id, model.Name);

                    return(RedirectToAction(nameof(Index)));
                }
            }
            catch (BadRequestException e)
            {
                ModelState.AddModelError("", e.Message);
            }

            return(View(model));
        }