public void Delete(int id) { try { var response = _Kpi.Delete(id); Console.WriteLine(response); } catch (Exception ex) { Assert.True(false, ex.Message); } }
public IActionResult Delete(int id) { IActionResult response; if (_kpi.IsUse(id)) { response = BadRequest(UtilityService.InitialResultError(string.Format(MessageValue.IsUseMessageFormat, MessageValue.KpiMessage), (int)System.Net.HttpStatusCode.BadRequest)); } else { response = Ok(_kpi.Delete(id)); } return(response); }