public virtual async Task <IActionResult> DeleteItem(int id) { try { await _businessLogicService.Delete(id).ConfigureAwait(false); return(Ok($"{typeof(TBL).Name} have been successfully removed")); } catch { return(NotFound($"{typeof(TBL).Name} not found")); } }
public virtual async Task <IActionResult> DeleteItem([FromBody] TBL item) { try { Debug.WriteLine($"Try to delete {typeof(TBL).Name} item"); await _businessLogicService.Delete(item).ConfigureAwait(false); return(Ok($"{typeof(TBL).Name} have been successfully removed")); } catch { return(NotFound($"{typeof(TBL).Name} not found")); } }