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()); }
private ModelDefinition ConvertClassToModelDef(Type t) { var mdc = new ModelDefinitionConverter(); return(mdc.ConverClassToModelDefinition(t)); }
private ModelDefinition ConvertClassToModelDef <T>() { var mdc = new ModelDefinitionConverter(); return(mdc.ConverClassToModelDefinition <T>()); }