コード例 #1
0
ファイル: SucursalBL.cs プロジェクト: joedayz/joerp
 public void Delete(int id)
 {
     try
     {
         repository.Delete(id);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
コード例 #2
0
 public void Delete(SucursalDTO entity)
 {
     try
     {
         Sucursal sucursal = Mapper.Map <Sucursal>(entity);
         _sucursalRepository.Delete(sucursal);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
        public HttpResponseMessage Delete(int id)
        {
            HttpResponseMessage response = new HttpResponseMessage();

            try
            {
                response.StatusCode = HttpStatusCode.OK;
                _repository.Delete(id);
                return(response);
            }
            catch (Exception e)
            {
                response.StatusCode   = HttpStatusCode.InternalServerError;
                response.ReasonPhrase = e.Message;
                return(response);
            }
        }