Пример #1
0
        public int InsertTrain([FromBody] JObject train)
        {
            int           trainId        = (int)train["trainId"];
            int           nocars         = (int)train["nocars"];
            string        company_name   = (string)train["company_name"];
            bool          passenger_flag = (bool)train["passenger_flag"];
            int           economy_class  = (int)train["economy_class"];
            int           business_class = (int)train["business_class"];
            bool          freight_flag   = (bool)train["freight_flag"];
            double        max_cargo      = (double)train["max_cargo"];
            double        max_volume     = (double)train["max_volume"];
            DatabaseModel dm             = new DatabaseModel();

            return(dm.AddTrain(trainId, nocars, company_name, passenger_flag, economy_class, business_class, freight_flag, max_cargo, max_volume));
        }