public async Task <IActionResult> Delete(int id)
        {
            try
            {
                await _contactBusinessLayer.DeleteContact(id);

                return(NoContent());
            }
            catch (Exception ex)
            {
                _logger.LogError($"{ ex.Message } {(ex.InnerException != null ? ex.InnerException.Message : string.Empty)} {ex.StackTrace}");
                return(NoContent());
            }
        }
Exemple #2
0
 // DELETE: api/Contacts/5
 public void Delete(int id)
 {
     _objContactBusinessLayer.DeleteContact(id);
 }