Ejemplo n.º 1
0
        /// <summary>
        /// 获取所有车型品牌
        /// </summary>
        /// <returns></returns>
        public Dictionary <string, List <string> > GetAllVehicleBrand()
        {
            var result = null as Dictionary <string, List <string> >;

            try
            {
                var brands = dbScopeManagerGungnirRead.Execute(conn => DalBaoYangActivitySetting.GetAllVehicleBrand(conn));
                if (brands != null && brands.Any())
                {
                    result = brands.Where(v => !string.IsNullOrWhiteSpace(v)).GroupBy(v => v.Substring(0, 1)).OrderBy(g => g.Key).ToDictionary(c => c.Key, c => c.ToList());
                }
            }
            catch (Exception ex)
            {
                Logger.Error("GetAllVehicleBrand", ex);
            }
            return(result);
        }