ASP.NET_Core_SPAs.Controllers.ContactsController.Delete C# (CSharp) Method

Delete() private method

private Delete ( int id ) : Task
id int
return Task
        public async Task<IActionResult> Delete(int? id)
        {
            if (id == null)
            {
                return NotFound();
            }

            var contact = await GetContacts().SingleAsync(m => m.Id == id);
            if (contact == null)
            {
                return NotFound();
            }

            return View(contact);
        }