コード例 #1
0
        public JsonAirplaneBrand AirplaneBrandList()
        {
            JsonAirplaneBrand             jsonAirplaneBrand        = new JsonAirplaneBrand();
            List <AirPlaneBrandviewModel> airplainBrandlinklistobj = new List <AirPlaneBrandviewModel>();

            try
            {
                foreach (var item in _brand.ToList())
                {
                    AirPlaneBrandviewModel airplaneBrandlistobj = new AirPlaneBrandviewModel();
                    airplaneBrandlistobj.BrandIcon = item.BrandIcon;
                    airplaneBrandlistobj.BrandId   = item.Id;
                    airplaneBrandlistobj.BrandName = item.BrandName;
                    airplainBrandlinklistobj.Add(airplaneBrandlistobj);
                }
                jsonAirplaneBrand.Result = airplainBrandlinklistobj;
                return(jsonAirplaneBrand);
            }
            catch (Exception ex)
            {
                string mes = ex.Message;
                return(jsonAirplaneBrand);
            }
        }