19.2.4 之后
public override void CustomizeTypesInfo(ITypesInfo typesInfo) { base.CustomizeTypesInfo(typesInfo); XPDictionary dictionary = XpoTypesInfoHelper.GetXpoTypeInfoSource().XPDictionary; //You can use this code to load missing classes into XPDictionary. However, it is better to do that in the code of your module as follows: this.AdditionalExportedTypes.Add(typeof(DevExpress.ExpressApp.Updating.ModuleInfo)); dictionary.GetClassInfo(typeof(DevExpress.ExpressApp.Xpo.Updating.ModuleInfo)); dictionary.GetClassInfo(typeof(DevExpress.Xpo.XPObjectType)); dictionary.GetClassInfo(typeof(DevExpress.Xpo.XPWeakReference)); foreach (XPClassInfo ci in dictionary.Classes) { if (ci.IsPersistent && (ci.AssemblyName.StartsWith("DevExpress.") || ci is DevExpress.Xpo.Metadata.Helpers.IntermediateClassInfo)) { ci.RemoveAttribute(typeof(PersistentAttribute)); ci.AddAttribute(new PersistentAttribute(string.Format("System_{0}", ci.TableName))); typesInfo.RefreshInfo(ci.ClassType); } } }
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/
浙公网安备 33010602011771号