public string GetCarModelName(int id) { CarModelInfo entity = GetCarModelModel(id, true); if (entity == null) { return(string.Empty); } return(entity.Name); }
public CarModelInfo GetCarModelModel(int id, bool fromCache = false) { CarModelInfo entity = null; List <CarModelInfo> list = GetCarModelList(fromCache); entity = list.Find(c => c.ID == id); return(entity); }
public static CarModelInfo PopulateCarModelInfo(IDataReader reader) { CarModelInfo entity = new CarModelInfo() { ID = (int)reader["ID"], Name = reader["Name"] as string, BrandID = (int)reader["BrandID"], BrandName = reader["BrandName"] as string, BrandNameIndex = reader["BrandNameIndex"] as string, SeriesName = reader["SeriesName"] as string, SeriesID = (int)reader["SeriesID"] }; return(entity); }
public abstract void UpdateCarModel(CarModelInfo entity);
public abstract int AddCarModel(CarModelInfo entity);
public void UpdateCarModel(CarModelInfo entity) { CommonDataProvider.Instance().UpdateCarModel(entity); }
public int AddCarModel(CarModelInfo entity) { return(CommonDataProvider.Instance().AddCarModel(entity)); }