public IActionResult Put([FromBody] BestWorkTimeVM request) { if (!ModelState.IsValid) { NotifyModelStateErrors(); return(Response(request)); } bestWorkService.Update(request); return(Response(request)); }
public IActionResult Create(BestWorkTimeVM request) { if (!ModelState.IsValid) { return(View(request)); } bwtService.Register(request); if (IsValidOperation()) { ViewBag.Sucesso = "Best Work Time Registered!"; } return(View(request)); }
public IActionResult Edit(BestWorkTimeVM request) { if (!ModelState.IsValid) { return(View(request)); } bwtService.Update(request); if (IsValidOperation()) { ViewBag.Sucesso = "Best Work Time Updated!"; } return(View(request)); }
public void Update(BestWorkTimeVM bestWorkVM) { var updateCommand = mapper.Map <UpdateBestWorkTimeCommand>(bestWorkVM); bus.SendCommand(updateCommand); }
public void Register(BestWorkTimeVM request) { var registerCommand = mapper.Map <RegisterNewBestWorkTimeCommand>(request); bus.SendCommand(registerCommand); }