public IActionResult Delete(FileEntry model)
        {
            var fileEntry = _fileEntryService.GetById(model.Id);

            _fileEntryService.Delete(fileEntry);
            _fileManager.Delete(fileEntry);

            return(RedirectToAction(nameof(Index)));
        }
Beispiel #2
0
        public IActionResult Delete(Guid id)
        {
            var fileEntry = _dispatcher.Dispatch(new GetEntityByIdQuery<FileEntry> { Id = id });

            _dispatcher.Dispatch(new DeleteEntityCommand<FileEntry> { Entity = fileEntry });
            _fileManager.Delete(fileEntry.ToFileEntryDTO());

            return Ok();
        }
Beispiel #3
0
        public IActionResult Delete(FileEntry model)
        {
            var fileEntry = _dispatcher.Dispatch(new GetEntityByIdQuery <FileEntry> {
                Id = model.Id
            });

            _dispatcher.Dispatch(new DeleteEntityCommand <FileEntry> {
                Entity = fileEntry
            });
            _fileManager.Delete(fileEntry);

            return(RedirectToAction(nameof(Index)));
        }