Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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;
        }