public async Task ExecuteAsync(DocumentLinkDto dto) { var repo = Uow.GetRepository <DocumentLink>(); var link = await repo.GetByIdAsync(dto.Id); repo.Delete(link); await Uow.SaveChangesAsync(); }
public async Task <DocumentLink> ExecuteAsync(DocumentLinkDto dto) { var repo = Uow.GetRepository <DocumentLink>(); var link = Mapper.Map <DocumentLink>(dto); await repo.CreateAsync(link); await Uow.SaveChangesAsync(); return(link); }