public BaseResponse <Food> Get() { BaseResponse <Food> response = null; try { string token = Request.Headers["Auth"]; int foodId = int.Parse(Request.Query["foodId"]); Food food = businessLogicLayer.FoodWithProducts(token, foodId); response = new BaseResponse <Food>(food); } catch (Exception ex) { response = new BaseResponse <Food>(); response.Error = ex.Message; } return(response); }