public async Task <ActionResult> PutSkier(SkierUpdateDto skier) { if (await _skierService.UpdateSkier(skier)) { return(Ok()); } return(BadRequest()); }
public async Task <IActionResult> UpdateSkier(int id, [CustomizeValidator(RuleSet = "*")][FromBody] Skier item) { if (item == null || item.Id != id) { return(BadRequest()); } var skier = await _skierService.GetSkier(id); if (skier == null) { return(NotFound()); } await _skierService.UpdateSkier(item); return(NoContent()); }