Example #1
0
        private string GenNormalUpdateParaString(object obj)
        {
            var ret    = new StringBuilder();
            var objMdf = new ModelDefinitionConverter().ConverClassToModelDefinition(obj.GetType());
            int i      = 1;

            foreach (var df in objMdf.PropertyColumnDic.Values)
            {
                ret.Append(" " + df.ColumnName + "=@" + df.PropName + " ");
                if (i < objMdf.PropertyColumnDic.Values.Count)
                {
                    ret.Append(" , ");
                    i++;
                }
            }
            return(ret.ToString());
        }
Example #2
0
        private ModelDefinition ConvertClassToModelDef(Type t)
        {
            var mdc = new ModelDefinitionConverter();

            return(mdc.ConverClassToModelDefinition(t));
        }
Example #3
0
        private ModelDefinition ConvertClassToModelDef <T>()
        {
            var mdc = new ModelDefinitionConverter();

            return(mdc.ConverClassToModelDefinition <T>());
        }