public LinkModel Add(LinkModel entity) { try { _repo.Add(_mapper.Map <Link>(entity)); UoW.Commit(); return(entity); } catch (Exception) { UoW.RollBack(); return(null); } }
public CategoryModel Add(CategoryModel entity) { try { _repo.Add(_mapper.Map <Category>(entity)); UoW.Commit(); return(entity); } catch (Exception) { UoW.RollBack(); return(null); } }
public LinkModel Update(LinkModel entity) { if (entity != null) { try { Link link = _mapper.Map <Link>(entity); _repo.Update(link); UoW.Commit(); return(entity); } catch (Exception) { UoW.RollBack(); return(null); } } return(null); }
public TodoModel Update(TodoModel entity) { if (entity != null) { try { Todo todo = _mapper.Map <Todo>(entity); _repo.Update(todo); UoW.Commit(); return(entity); } catch (Exception) { UoW.RollBack(); return(null); } } return(null); }
public FileModel Update(FileModel entity) { if (entity != null) { try { File category = _mapper.Map <File>(entity); _repo.Update(category); UoW.Commit(); return(entity); } catch (Exception) { UoW.RollBack(); return(null); } } return(null); }
public SubCategoryModel Update(SubCategoryModel entity) { if (entity != null) { try { SubCategory subCategory = _mapper.Map <SubCategory>(entity); _repo.Update(subCategory); UoW.Commit(); return(entity); } catch (Exception) { UoW.RollBack(); return(null); } } return(null); }