public async Task <IActionResult> AddWay(NewWayOfWorkModel model) { var way = BuildWay(model); await _wayOfWorkService.Create(way); return(RedirectToAction("Index", way.Id)); }
private WayOfWork BuildWay(NewWayOfWorkModel model) { return(new WayOfWork { Name = model.Name, Description = model.Description, Progress = model.Progress }); }