Esempio n. 1
0
 public void Delete(int id)
 {
     try
     {
         var response = _Kpi.Delete(id);
         Console.WriteLine(response);
     }
     catch (Exception ex)
     {
         Assert.True(false, ex.Message);
     }
 }
Esempio n. 2
0
        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);
        }