コード例 #1
0
        public IActionResult Delete(FileEntry model)
        {
            var fileEntry = _fileEntryService.GetById(model.Id);

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

            return(RedirectToAction(nameof(Index)));
        }
コード例 #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();
        }
コード例 #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)));
        }