Пример #1
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            RemoveFile = await _fileContext.Delete(id.Value);

            return(Redirect("/Projects/Details?id=" + RemoveFile.ProjectId));
        }
Пример #2
0
        public async Task <ActionResult> Delete([Required] int id)
        {
            var deletedFile = await _fileDatabase.Delete(id);

            return(deletedFile == null ? (StatusCodeResult)NotFound() : NoContent());
        }