예제 #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);
            }
        }