public override YellowstonePathology.Business.Persistence.SubmissionResult Submit() { YellowstonePathology.Business.Persistence.SqlCommandSubmitter sqlCommandSubmitter = this.GetSqlCommands(this.m_Value); YellowstonePathology.Business.Persistence.SubmissionResult result = sqlCommandSubmitter.SubmitChanges(); ObjectCloner objectCloner = new ObjectCloner(); this.m_Clone = objectCloner.Clone(this.m_Value); return result; }
public override YellowstonePathology.Business.Persistence.SubmissionResult Submit() { PersistentClass persistentClassAttribute = (PersistentClass)this.m_Type.GetCustomAttributes(typeof(PersistentClass), false).Single(); SqlCommandSubmitter objectSubmitter = new SqlCommandSubmitter(persistentClassAttribute.Database); PropertyInfo keyProperty = this.m_Type.GetProperties().Where(prop => Attribute.IsDefined(prop, typeof(PersistentPrimaryKeyProperty))).Single(); object keyPropertyValue = keyProperty.GetValue(this.m_Value, null); InsertCommandBuilder insertCommandBuilder = new InsertCommandBuilder(); insertCommandBuilder.Build(this.m_Value, objectSubmitter.SqlInsertCommands, objectSubmitter.SqlInsertLastCommands); ObjectCloner objectCloner = new ObjectCloner(); this.m_Clone = objectCloner.Clone(this.m_Value); return objectSubmitter.SubmitChanges(); }
public override YellowstonePathology.Business.Persistence.SubmissionResult Submit() { PersistentClass persistentClassAttribute = (PersistentClass)this.m_Type.GetCustomAttributes(typeof(PersistentClass), false).Single(); SqlCommandSubmitter objectSubmitter = new SqlCommandSubmitter(persistentClassAttribute.Database); PropertyInfo keyProperty = this.m_Type.GetProperties().Where(prop => Attribute.IsDefined(prop, typeof(PersistentPrimaryKeyProperty))).Single(); object keyPropertyValue = keyProperty.GetValue(this.m_Value, null); InsertCommandBuilder insertCommandBuilder = new InsertCommandBuilder(); insertCommandBuilder.Build(this.m_Value, objectSubmitter.SqlInsertCommands, objectSubmitter.SqlInsertLastCommands); ObjectCloner objectCloner = new ObjectCloner(); this.m_Clone = objectCloner.Clone(this.m_Value); return(objectSubmitter.SubmitChanges()); }
public void ResetClone() { ObjectCloner objectCloner = new ObjectCloner(); this.m_Clone = objectCloner.Clone(this.m_Value); }
public PersistentUpdateTracker(object objectToUpdate) { this.m_ObjectToUpdate = objectToUpdate; ObjectCloner objectCloner = new ObjectCloner(); this.m_OriginalValues = objectCloner.Clone(this.m_ObjectToUpdate); }
public DocumentUpdate(DocumentId documentId) : base(documentId) { ObjectCloner objectCloner = new ObjectCloner(); this.m_Clone = objectCloner.Clone(this.m_Value); }