示例#1
0
        public async Task <ActionResult> Delete(int id)
        {
            try
            {
                // TODO: Add delete logic here
                await _repo.DeleteExampleAsync(id, User.Identity.Name);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
示例#2
0
 public async Task <IActionResult> Delete(int Id) => Ok(await _repo.DeleteExampleAsync(Id, User.FindFirst("uid")?.Value).ConfigureAwait(false));