Beispiel #1
0
        public async Task <ActionResult> DeleteAsync(string id)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(Unauthorized());
            }

            await _itemsRepo.DeleteItemAsync(id, User.Identity.Name);

            return(NoContent());
        }
Beispiel #2
0
        public async Task <ActionResult> DeleteConfirmedAsync(string id)
        {
            await _itemsRepo.DeleteItemAsync(id, User.Identity.Name);

            return(RedirectToAction("Index"));
        }