public IHttpActionResult Get()
        {
            var mngr = new FineManager();

            apiResp.Data = mngr.RetrieveAll();
            return(Ok(apiResp));
        }
        //[HttpDelete]
        //[Route("api/FineType/DeleteFineType")]
        public IHttpActionResult Delete(FineType fineType)
        {
            apiResp = new ApiResponse
            {
                Message = "Se elimino existosamente"
            };
            var mng = new FineManager();

            mng.DeleteFineType(fineType);
            return(Ok(apiResp));
        }
        public IHttpActionResult Get()
        {
            try
            {
                var mng = new FineManager();
                apiResp.Data = mng.RetrieveFinesTypes();

                return(Ok(apiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
        public IHttpActionResult Delete(Fine fine)
        {
            try
            {
                var mngr = new FineManager();
                mngr.Delete(fine);
                apiResp.Message = "La multa ha sido eliminada exitosamente";

                return(Ok(apiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
 public IHttpActionResult RetrieveById(int idFine)
 {
     try
     {
         var mngr = new FineManager();
         var fine = new Fine
         {
             IdFine = idFine
         };
         fine         = mngr.RetrieveById(fine);
         apiResp.Data = fine;
         return(Ok(apiResp));
     }
     catch (BusinessException bex)
     {
         return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
     }
 }
        public IHttpActionResult Put(FineType fineType)
        {
            try
            {
                var mng = new FineManager();
                mng.UpdateFinesSettings(fineType);

                apiResp = new ApiResponse
                {
                    Message = "El tipo de multa ha sido actualizado"
                };

                return(Ok(apiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }
        public IHttpActionResult Post(FineType fineType)
        {
            try
            {
                var mngr = new FineManager();
                mngr.CreateFineType(fineType);

                apiResp = new ApiResponse
                {
                    Message = "El tipo de multa ha sido creado exitosamente"
                };

                return(Ok(apiResp));
            }
            catch (BusinessException bex)
            {
                return(InternalServerError(new Exception(bex.ExceptionId + "-" + bex.AppMessage.Message)));
            }
        }