Exemple #1
0
 public IHttpActionResult RemoveClient(List <string> id)
 {
     try
     {
         _deal.DeleteDeal(int.Parse(id[0]));
         return(Ok());
     }
     catch
     {
         return(BadRequest());
     }
 }
Exemple #2
0
        public string DeleteDeal(int dealId)
        {
            string result = FAIL;

            try
            {
                if (dealRepository.DeleteDeal(dealId))
                {
                    result = SUCCESS;
                }
            }
            catch (Exception ex)
            {
                ex.LogExceptionToFile();
                throw new Exception(ex.Message);
            }
            return(result);
        }