public ActionResult EditBuild(BuildEntityViewModel buildEntity) { if (ModelState.IsValid) { var buildDTO = Mapper.Map <BuildEntityViewModel, BuildEntityDTO>(buildEntity); buildDTO.UserID = User != null?User.Identity.GetUserId() : null; Service.EditBuild(buildDTO); return(RedirectToAction("Builds")); } return(View(buildEntity)); }