public Response <Car> ActivateCarById(int CarID)
        {
            Response <Car> res = new Response <Car>();

            try
            {
                using (var carBusiness = new CarBusiness())
                {
                    res = carBusiness.ActivateCarById(CarID);
                }
            }
            catch (Exception ex)
            {
                res.isSuccess = false;
                res.Message   = "An error occured in CarService.ActivateCarById\n" + ex.Message;
            }
            return(res);
        }
Ejemplo n.º 2
0
        public IHttpActionResult Activate(int id)
        {
            var content = new Response <Car>();

            try
            {
                using (var carBusines = new CarBusiness())
                {
                    content = carBusines.ActivateCarById(id);
                }
            }
            catch (Exception ex)
            {
                content.isSuccess = false;
                content.Message  += ex.Message;
            }
            return(new StandartResult <Car>(content, Request));
        }