Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 public async Task Create(string userId, Folder Folder)
 {
     Folder.UpdatedUserId = Folder.CreatedUserId = userId;
     await repository.CreateAsync(Folder);
 }