public async Task <Component> CopyToAsync(Component component, Component parent) { var folder = new Folder { Name = $"Copy of {component.Name}", ParentFolderId = parent.Id }; await _repository.CreateAsync(folder); return(ToComponent(folder)); }
public async Task SaveFolderAsync(Folder folder) { if (folder.Id == default(Guid)) { await _folderRepository.CreateAsync(folder); // push //await _pushService.PushSyncCipherCreateAsync(cipher); } else { folder.RevisionDate = DateTime.UtcNow; await _folderRepository.UpsertAsync(folder); // push //await _pushService.PushSyncCipherUpdateAsync(cipher); } }
public async Task Create(string userId, Folder Folder) { Folder.UpdatedUserId = Folder.CreatedUserId = userId; await repository.CreateAsync(Folder); }