public IActionResult Edit(Logica.Models.BindingModel.ProjectsEditBindingModel model) { if (ModelState.IsValid) { Logica.BL.Projects project = new Logica.BL.Projects(); project.UpdateProjects(model.Id, model.Title, model.Details, model.ExpectedCompletionDate); return(RedirectToAction("Index")); } return(View(model)); }
public IActionResult Edit(int?id) { Logica.BL.Projects projects = new Logica.BL.Projects(); var project = projects.GetProjects(id, null).FirstOrDefault(); var projectBindingModel = new Logica.Models.BindingModel.ProjectsEditBindingModel { Id = project.Id, Details = project.Details, Title = project.Title, ExpectedCompletionDate = project.ExpectedCompletionDate }; return(View(projectBindingModel)); }