public InstroductionResponse GetInstroduction(int id) { var instroduction = _instroductionRepository.GetSingle(g => g.Id == id && !g.IsDeleted); var response = new InstroductionResponse { Name = instroduction.Name, Description = instroduction.Description }; return(response); }
public ActionResult Update(int id) { var instroduction = _instroductionService.GetInstroduction(id); if (instroduction == null) { return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); } var updateInstroduction = new InstroductionResponse { Id = id, Description = instroduction.Description, CreateBy = instroduction.CreateBy, CreateDate = instroduction.CreateDate, Name = instroduction.Name }; return(View("Update", updateInstroduction)); }