private bool LoadByPrimaryKeyDynamic(System.Int32 storeId, System.String name) { StoreSettingQuery query = new StoreSettingQuery(); query.Where(query.StoreId == storeId, query.Name == name); return(this.Load(query)); }
protected void InitQuery(StoreSettingQuery query) { query.OnLoadDelegate = this.OnQueryLoaded; if (!query.es2.HasConnection) { query.es2.Connection = ((IEntityCollection)this).Connection; } }
private void LoadSettings() { var q = new StoreSettingQuery(); q.Select(q.Name, q.Value); q.Where(q.StoreId == this.Id.Value); Dictionary <string, string> dict = new Dictionary <string, string>(); using (IDataReader reader = q.ExecuteReader()) { while (reader.Read()) { dict[reader.GetString(0)] = reader.GetString(1); } reader.Close(); } this.settings = dict; }
public bool Load(StoreSettingQuery query) { this.query = query; InitQuery(this.query); return(Query.Load()); }