예제 #1
0
 public async Task <IActionResult> Edit(RequestsViewModel model)
 {
     if (model == null)
     {
         return(StatusCode(StatusCodes.Status400BadRequest));
     }
     if (ModelState.IsValid)
     {
         await repository.EditRequest((Requests)modelMapper.Map(model, typeof(RequestsViewModel), typeof(Requests)));
     }
     return(RedirectToAction("Edit", model));
 }