示例#1
0
        public async Task <IActionResult> Delete([FromRoute] int id)
        {
            var user = await _userManager.FindByNameAsync(User.Identity.Name);

            await _projectManagementLogic.Delete(user, id);

            TempData["Message"] = "Successfully deleted the project";

            return(RedirectToAction("Index"));
        }
示例#2
0
 // logically delete specific project (sets bool value in database to false)
 public IActionResult Delete(int id)
 {
     _projectManagementLogic.Delete(id);
     return(Ok());
 }