Exemplo n.º 1
0
        private static void loadMappingInfo(DbConfig dbc)
        {
            if (dbc.Mapping.Count == 0)
            {
                return;
            }
            foreach (Dictionary <String, object> dic in dbc.Mapping)
            {
                MappingInfo mi = new MappingInfo();

                if (dic.ContainsKey("name"))
                {
                    mi.TypeName = dic["name"].ToString();
                }
                if (dic.ContainsKey("database"))
                {
                    mi.Database = dic["database"].ToString();
                }
                if (dic.ContainsKey("table"))
                {
                    mi.Table = dic["table"].ToString();
                }

                dbc.addMapping(mi);
            }
        }
Exemplo n.º 2
0
 private static void loadMappingInfo(DbConfig dbc)
 {
     if (dbc.Mapping.Count == 0)
     {
         return;
     }
     foreach (MappingInfo x in dbc.Mapping)
     {
         dbc.addMapping(x);
     }
 }
Exemplo n.º 3
0
 private static void loadMappingInfo( DbConfig dbc )
 {
     if (dbc.Mapping.Count == 0) return;
     foreach (MappingInfo x in dbc.Mapping) {
         dbc.addMapping( x );
     }
 }
Exemplo n.º 4
0
        private static void loadMappingInfo( DbConfig dbc )
        {
            if (dbc.Mapping.Count == 0) return;
            foreach (Dictionary<String, object> dic in dbc.Mapping) {

                MappingInfo mi = new MappingInfo();

                if (dic.ContainsKey( "name" )) mi.TypeName = dic["name"].ToString();
                if (dic.ContainsKey( "database" )) mi.Database = dic["database"].ToString();
                if (dic.ContainsKey( "table" )) mi.Table = dic["table"].ToString();

                dbc.addMapping( mi );
            }
        }