コード例 #1
0
        public async Task <IActionResult> Delete([FromBody] Persons persons)
        {
            var  location   = GetControllerActionNames();
            bool resultData = false;

            try
            {
                resultData = await _npRepo.Delete(persons);
            }
            catch (Exception e)
            {
                _logger.LogWarn($"{location}: {e.Message} - {e.InnerException}");
            }
            return(Ok(resultData));
        }
コード例 #2
0
 public async void Delete(string id)
 {
     await _rep.Delete(id);
 }
コード例 #3
0
 public void Delete(int id)
 {
     _personsRepository.Delete(id);
 }
コード例 #4
0
 public ActionResult Delete(long id, object dummy)
 {
     _personsRepository.Delete(id);
     return(RedirectToAction("Index"));
 }