Example #1
0
        public GetPizzaResponse GetById(GetPizzaRequest getPizzaRequest)
        {
            GetPizzaResponse result = new GetPizzaResponse();

            try
            {
                Pizza pizza = _pizzaRepository.FindBy(getPizzaRequest.Id);
                result.Pizza = pizza.ConvertToViewModel();
            }
            catch (Exception ex)
            {
                result.StatusCode       = HttpStatusCode.InternalServerError;
                result.StatusDesciption = ex.Message;
            }

            return(result);
        }