示例#1
0
文件: CarDL.cs 项目: Dharan21/l2g_API
 public List <FuelVM> GetFuelTypes()
 {
     using (var db = new Lead2OrderGenerateDbEntities())
     {
         List <l2g_tbl_Fuel> fuelTypes = db.l2g_tbl_Fuel.ToList();
         if (fuelTypes.Count > 0)
         {
             List <FuelVM> fuelVMs = new List <FuelVM>();
             foreach (var fuelType in fuelTypes)
             {
                 fuelVMs.Add(MappingConfig.FuelToBusinessEntity(fuelType));
             }
             return(fuelVMs);
         }
         return(new List <FuelVM>());
     }
 }