public override FileDTO Add(FileDTO entity) { var file = DTOService.ToEntity <FileDTO, File>(entity); currentRepo.Insert(file); uow.Commit(); return(DTOService.ToDTO <File, FileDTO>(file)); }
public virtual DTO Update(DTO entity) { var changedDomainEntity = DTOService.ToEntity <DTO, DomainEntity>(entity); currentRepo.Update(changedDomainEntity); uow.Commit(); return(DTOService.ToDTO <DomainEntity, DTO>(changedDomainEntity)); }
public NoteDTO Update(NoteDTO noteToChange) { var changedNote = DTOService.ToEntity <NoteDTO, Note>(noteToChange); uow.NoteRepo.Update(changedNote); uow.Commit(); return(DTOService.ToDTO <Note, NoteDTO>(changedNote)); }
public virtual DTO Add(DTO entity) { var entityToAdd = DTOService.ToEntity <DTO, DomainEntity>(entity); currentRepo.Insert(entityToAdd); uow.Commit(); return(DTOService.ToDTO <DomainEntity, DTO>(entityToAdd)); }
public NoteDTO Add(NoteDTO noteToAdd) { var newNote = DTOService.ToEntity <NoteDTO, Note>(noteToAdd); uow.NoteRepo.Insert(newNote); uow.Commit(); return(DTOService.ToDTO <Note, NoteDTO>(newNote)); }