예제 #1
0
        public static ObjectItem GetObject(string name, DbContextEx db)
        {
            ObjectItem temp = new ObjectItem();

            string opsXml = __Config[name]["Object"].OuterText;

            if (opsXml.IndexOf("{db}") > 0)
            {
                opsXml = opsXml.Replace("{db}", db.getSchema());
            }

            XDom.Bind(temp, opsXml);

            return(temp);
        }
예제 #2
0
        public static PropertyItem GetProperty(string name, DbContextEx db)
        {
            PropertyItem temp = new PropertyItem();

            string opsXml = __Config[name]["Property"].OuterText;

            if (opsXml.IndexOf("{db}") > 0)
            {
                opsXml = opsXml.Replace("{db}", db.getSchema());
            }

            XDom.Bind(temp, opsXml);

            if (temp.View.Trim().IndexOf(" ") < 0)
            {
                temp.View = temp.Table;
            }

            return(temp);
        }