protected virtual void ReadRecord(System.Data.IDataReader reader, CodeFluent.Runtime.CodeFluentReloadOptions options) { if ((reader == null)) { throw new System.ArgumentNullException("reader"); } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.Properties) == 0) == false)) { this._id = CodeFluentPersistence.GetReaderValue(reader, "Contact_Id", ((int)(-1))); this._email = CodeFluentPersistence.GetReaderValue(reader, "Contact_Email", ((string)(default(string)))); this._firstName = CodeFluentPersistence.GetReaderValue(reader, "Contact_FirstName", ((string)(default(string)))); this._lastName = CodeFluentPersistence.GetReaderValue(reader, "Contact_LastName", ((string)(default(string)))); this.ContactSourceId = CodeFluentPersistence.GetReaderValue(reader, "Contact_ContactSource_Id", ((int)(-1))); this._status = ((ContactManager.Status)(CodeFluentPersistence.GetReaderValueEnum(reader, "Contact_Status", ((ContactManager.Status)(ContactManager.Status.Valid))))); this.AddressId = CodeFluentPersistence.GetReaderValue(reader, "Contact_Address_Id", ((int)(-1))); this.UserId = CodeFluentPersistence.GetReaderValue(reader, "Contact_User_Id", ((int)(-1))); this._description = CodeFluentPersistence.GetReaderValue(reader, "Contact_Description", ((string)(default(string)))); } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.RowVersion) == 0) == false)) { this._rowVersion = CodeFluentPersistence.GetReaderValue(reader, "_rowVersion", ((byte[])(null))); } this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.ReadRecord, false, false)); }
protected internal void OnEntityDeserializing(System.Runtime.Serialization.StreamingContext context) { this.IsDeserializing = true; this._raisePropertyChangedEvents = true; this._id = -1; this._email = default(string); this._firstName = default(string); this._lastName = default(string); this._contactSourceId = -1; this._contactSource = null; this._status = ContactManager.Status.Valid; this._addressId = -1; this._address = null; this._userId = -1; this._user = null; this._description = default(string); this._entityState = CodeFluent.Runtime.CodeFluentEntityState.Created; this._raisePropertyChangedEvents = true; }