BistroDriveWebApp.Controllers.ApiController.GetPriceLimit C# (CSharp) Méthode

GetPriceLimit() private méthode

private GetPriceLimit ( JsonRequestBody json ) : JsonRespondBody
json JsonRequestBody
Résultat JsonRespondBody
        private JsonRespondBody GetPriceLimit(JsonRequestBody json)
        {
            aspnetuser user = DataManager.User.GetUserByToken(json.Token);
            if (user == null)
            {
                return new JsonRespondBody { Error = "Invalid token", Status = "error" };
            }

            Dictionary<string, string> list = new Dictionary<string, string>();

            //генерация ответа
            int minPrice = DataManager.Dish.GetMinPrice();
            int maxPrice = DataManager.Dish.GetMaxPrice();
            list.Add("MinPrice", minPrice.ToString());
            list.Add("MaxPrice", maxPrice.ToString());
            JsonRespondBody result = new JsonRespondBody
            {
                Result = list,
                Status = "OK"
            };
            return result;
        }