public void Update(int id, FileInfo item) { _fileInfoRepository.Update(id, Mapper.Map<FileInfo, DAL.Models.FileInfo>(item)); _fileInfoRepository.SaveChanges(); }
public ActionResult Edit(FileInfo fileInfo) { fileInfo.Manager = _elementsService.ManagersItems.FirstOrDefault(x => x.Id == fileInfo.Manager.Id); _elementsService.Update(fileInfo.Id, fileInfo); return RedirectToAction("List"); }
public void Add(FileInfo fileInfo) { _fileInfoRepository.Add(Mapper.Map<FileInfo, DAL.Models.FileInfo>(fileInfo)); _fileInfoRepository.SaveChanges(); }