private void InsertRealTimeData <T>(RealTimeData <T> data) where T : class { if (IsDataExist(data.BusinessKey, data.BusinessDataType)) { MoveDataToHistory(data.BusinessKey, data.BusinessDataType); } DataCommand command = DataCommandManager.GetDataCommand("RealTime_PersisteData"); command.SetParameterValue("BusinessKey", data.BusinessKey); command.SetParameterValue("BusinessDataType", data.BusinessDataType); command.SetParameterValue("ChangeType", data.ChangeType); command.SetParameterValue("CustomerSysNo", data.CustomerSysNo); command.SetParameterValue("@BusinessData", SerializationUtility.XmlSerialize(data.Body)); command.ExecuteNonQuery(); }
public void Persiste <T>(RealTimeData <T> data) where T : class { using (TransactionScope scope = new TransactionScope()) { InsertRealTimeData(data); //string name = typeof(T).Name; //var extensionConfig = ConfigHelper.GetExtensionConfig(name); ////持久化扩展表数据 //if (extensionConfig != null) //{ // var type = Type.GetType(extensionConfig.ExtensionType); // IRealTimeExtensionPersister extension = Invoker.CreateInstance(type) as IRealTimeExtensionPersister; // if (extension != null) // { // extension.Persiste<T>(data.Body); // } //} scope.Complete(); } }
public void Persiste <T>(RealTimeData <T> data) where T : class { throw new NotImplementedException(); }
public static void Persiste <T>(RealTimeData <T> data) where T : class { ConfigHelper.GetDefaultPersiter().Persiste <T>(data); }