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, "Address_Id", ((int)(-1))); this._line1 = CodeFluentPersistence.GetReaderValue(reader, "Address_Line1", ((string)(default(string)))); this._line2 = CodeFluentPersistence.GetReaderValue(reader, "Address_Line2", ((string)(default(string)))); this._city = CodeFluentPersistence.GetReaderValue(reader, "Address_City", ((string)(default(string)))); this._zip = CodeFluentPersistence.GetReaderValue(reader, "Address_Zip", ((string)(default(string)))); this._country = CodeFluentPersistence.GetReaderValue(reader, "Address_Country", ((string)(default(string)))); this.ContactId = CodeFluentPersistence.GetReaderValue(reader, "Address_Contact_Id", ((int)(-1))); } 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 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, "Space_Id", ((int)(-1))); this._name = CodeFluentPersistence.GetReaderValue(reader, "Space_Name", ((string)(default(string)))); this._description = CodeFluentPersistence.GetReaderValue(reader, "Space_Description", ((string)(default(string)))); this._width = CodeFluentPersistence.GetReaderValue(reader, "Space_Width", ((float)(CodeFluentPersistence.DefaultSingleValue))); this._height = CodeFluentPersistence.GetReaderValue(reader, "Space_Height", ((float)(CodeFluentPersistence.DefaultSingleValue))); this._tVA = CodeFluentPersistence.GetReaderValue(reader, "Space_TVA", ((float)(CodeFluentPersistence.DefaultSingleValue))); this._price = CodeFluentPersistence.GetReaderValue(reader, "Space_Price", ((decimal)(CodeFluentPersistence.DefaultDecimalValue))); } 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 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, "UserClaim_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._type = CodeFluentPersistence.GetReaderValue(reader, "UserClaim_Type", ((string)(default(string)))); this._value = CodeFluentPersistence.GetReaderValue(reader, "UserClaim_Value", ((string)(default(string)))); this._valueType = CodeFluentPersistence.GetReaderValue(reader, "UserClaim_ValueType", ((string)(default(string)))); this._issuer = CodeFluentPersistence.GetReaderValue(reader, "UserClaim_Issuer", ((string)(default(string)))); this._originalIssuer = CodeFluentPersistence.GetReaderValue(reader, "UserClaim_OriginalIssuer", ((string)(default(string)))); this.UserId = CodeFluentPersistence.GetReaderValue(reader, "UserClaim_User_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); } 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 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, "User_Id", ((int)(-1))); this.BinaryLargeObjectsReset(); this._email = CodeFluentPersistence.GetReaderValue(reader, "User_Email", ((string)(default(string)))); this._firstName = CodeFluentPersistence.GetReaderValue(reader, "User_FirstName", ((string)(default(string)))); this._lastName = CodeFluentPersistence.GetReaderValue(reader, "User_LastName", ((string)(default(string)))); this.Photo.LoadMetaData(reader); } 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 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, "Customer_Id", ((int)(-1))); this._name = CodeFluentPersistence.GetReaderValue(reader, "Customer_Name", ((string)(default(string)))); this._address = CodeFluentPersistence.GetReaderValue(reader, "Customer_Address", ((string)(default(string)))); this._city = CodeFluentPersistence.GetReaderValue(reader, "Customer_City", ((string)(default(string)))); this._zipCode = CodeFluentPersistence.GetReaderValue(reader, "Customer_ZipCode", ((string)(default(string)))); this._country = CodeFluentPersistence.GetReaderValue(reader, "Customer_Country", ((string)(default(string)))); this._phone = CodeFluentPersistence.GetReaderValue(reader, "Customer_Phone", ((string)(default(string)))); this._fax = CodeFluentPersistence.GetReaderValue(reader, "Customer_Fax", ((string)(default(string)))); this._webSite = CodeFluentPersistence.GetReaderValue(reader, "Customer_WebSite", ((string)(default(string)))); this._language = ((SoftFluent.Json.NET.Language)(CodeFluentPersistence.GetReaderValueEnum(reader, "Customer_Language", ((SoftFluent.Json.NET.Language)(SoftFluent.Json.NET.Language.French))))); this._customerType = ((SoftFluent.Json.NET.CustomerType)(CodeFluentPersistence.GetReaderValueEnum(reader, "Customer_CustomerType", ((SoftFluent.Json.NET.CustomerType)(SoftFluent.Json.NET.CustomerType.Client))))); } 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 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, "Campaign_Id", ((int)(-1))); this._name = CodeFluentPersistence.GetReaderValue(reader, "Campaign_Name", ((string)(default(string)))); this._state = ((SoftFluent.Json.NET.CampaignStateType)(CodeFluentPersistence.GetReaderValueEnum(reader, "Campaign_State", ((SoftFluent.Json.NET.CampaignStateType)(SoftFluent.Json.NET.CampaignStateType.Conceived))))); this.CustomerId = CodeFluentPersistence.GetReaderValue(reader, "Campaign_Customer_Id", ((int)(-1))); this._price = CodeFluentPersistence.GetReaderValue(reader, "Campaign_Price", ((decimal)(CodeFluentPersistence.DefaultDecimalValue))); this._priceAllTaxIncluded = CodeFluentPersistence.GetReaderValue(reader, "Campaign_PriceAllTaxIncluded", ((decimal)(CodeFluentPersistence.DefaultDecimalValue))); this._discountRate = CodeFluentPersistence.GetReaderValue(reader, "Campaign_DiscountRate", ((decimal)(CodeFluentPersistence.DefaultDecimalValue))); this._conceptionDate = CodeFluentPersistence.GetReaderValue(reader, "Campaign_ConceptionDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue))); this._addressedDate = CodeFluentPersistence.GetReaderValue(reader, "Campaign_AddressedDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue))); this._propositionDate = CodeFluentPersistence.GetReaderValue(reader, "Campaign_PropositionDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue))); this._confirmationDate = CodeFluentPersistence.GetReaderValue(reader, "Campaign_ConfirmationDate", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue))); } 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 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 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, "Document_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._text = CodeFluentPersistence.GetReaderValue(reader, "Document_Text", ((string)(default(string)))); this.UserId = CodeFluentPersistence.GetReaderValue(reader, "Document_User_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._title = CodeFluentPersistence.GetReaderValue(reader, "Document_Title", ((string)(default(string)))); this.DirectoryId = CodeFluentPersistence.GetReaderValue(reader, "Document_Directory_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._reference = CodeFluentPersistence.GetReaderValue(reader, "Document_Reference", ((string)(default(string)))); this._token = CodeFluentPersistence.GetReaderValue(reader, "Document_Token", ((string)(default(string)))); this._isProcessed = CodeFluentPersistence.GetReaderValue(reader, "Document_IsProcessed", ((bool)(CodeFluentPersistence.DefaultBooleanValue))); this._isReady = CodeFluentPersistence.GetReaderValue(reader, "Document_IsReady", ((bool)(CodeFluentPersistence.DefaultBooleanValue))); } 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)); }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { ContactManager.Proxy.User user = ContactManager.Proxy.User.LoadByEntityKey(this.EntityKey); if ((user == null)) { return(false); } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.Properties) == 0) == false)) { user.CopyTo(this, true); } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.RowVersion) == 0) == false)) { this.RowVersion = user.RowVersion; } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.BinaryLargeObjects) == 0) == false)) { user.BinaryLargeObjectsCopyTo(this); } return(true); }
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._fullName = CodeFluentPersistence.GetReaderValue(reader, "Customer_FullName", ((string)(default(string)))); this._dateOfBirth = CodeFluentPersistence.GetReaderValue(reader, "Customer_DateOfBirth", ((System.DateTime)(CodeFluentPersistence.DefaultDateTimeValue))); } }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { SoftFluent.Samples.SignalR.Proxy.Customer customer = SoftFluent.Samples.SignalR.Proxy.Customer.LoadByEntityKey(this.EntityKey); if ((customer == null)) { return(false); } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.Properties) == 0) == false)) { customer.CopyTo(this, true); } return(true); }
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, "Customer_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._name = CodeFluentPersistence.GetReaderValue(reader, "Customer_Name", ((string)(default(string)))); this.ContactSourceId = CodeFluentPersistence.GetReaderValue(reader, "Customer_ContactSource_Id", ((int)(-1))); } this.OnEntityAction(new CodeFluent.Runtime.CodeFluentEntityActionEventArgs(this, CodeFluent.Runtime.CodeFluentEntityAction.ReadRecord, false, false)); }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { ContactManager.Proxy.ContactSource contactSource = ContactManager.Proxy.ContactSource.LoadByEntityKey(this.EntityKey); if ((contactSource == null)) { return(false); } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.Properties) == 0) == false)) { contactSource.CopyTo(this, true); } if ((((options & CodeFluent.Runtime.CodeFluentReloadOptions.RowVersion) == 0) == false)) { this.RowVersion = contactSource.RowVersion; } return(true); }
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, "Support_Id", ((int)(-1))); this._name = CodeFluentPersistence.GetReaderValue(reader, "Support_Name", ((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 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._vehicleId = CodeFluentPersistence.GetReaderValue(reader, "Vehicle_VehicleId", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._brand = CodeFluentPersistence.GetReaderValue(reader, "Vehicle_Brand", ((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 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, "Sample_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._gender = CodeFluentPersistence.GetReaderValue(reader, "Sample_Gender", Gender.Male); this._day = CodeFluentPersistence.GetReaderValue(reader, "Sample_Day", Day.None); } 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)); }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { bool ret = false; if (((this.RoleId.Equals(CodeFluentPersistence.DefaultGuidValue) == true) || (this.UserId.Equals(CodeFluentPersistence.DefaultGuidValue) == true))) { return(ret); } CodeFluent.Runtime.CodeFluentPersistence persistence = CodeFluentContext.Get(SoftFluent.Samples.GED.Constants.SoftFluent_Samples_GEDStoreName).Persistence; persistence.CreateStoredProcedureCommand(null, "UserRole", "Load"); persistence.AddParameter("@RoleId", this.RoleId, CodeFluentPersistence.DefaultGuidValue); persistence.AddParameter("@UserId", this.UserId, CodeFluentPersistence.DefaultGuidValue); System.Data.IDataReader reader = null; try { reader = persistence.ExecuteReader(); if ((reader.Read() == true)) { this.ReadRecord(reader, options); this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Unchanged; ret = true; } else { this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Deleted; } } finally { if ((reader != null)) { reader.Dispose(); } persistence.CompleteCommand(); } return(ret); }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { bool ret = false; if ((this.Id.Equals(CodeFluentPersistence.DefaultGuidValue) == true)) { return(ret); } CodeFluent.Runtime.CodeFluentPersistence persistence = CodeFluentContext.Get(SoftFluent.Samples.RedisCache.Constants.SoftFluent_Samples_RedisCacheStoreName).Persistence; persistence.CreateStoredProcedureCommand(null, "Category", "Load"); persistence.AddParameter("@Id", this.Id); persistence.AddParameter("@Lcid", System.Threading.Thread.CurrentThread.CurrentUICulture.LCID, ((int)(1033))); System.Data.IDataReader reader = null; try { reader = persistence.ExecuteReader(); if ((reader.Read() == true)) { this.ReadRecord(reader, options); this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Unchanged; ret = true; } else { this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Deleted; } } finally { if ((reader != null)) { reader.Dispose(); } persistence.CompleteCommand(); } return(ret); }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { bool ret = false; if ((this.Id.Equals(CodeFluentPersistence.DefaultGuidValue) == true)) { return(ret); } CodeFluent.Runtime.CodeFluentPersistence persistence = CodeFluentContext.Get(SoftFluent.Samples.EncryptAspect.Constants.SoftFluent_Samples_EncryptAspectStoreName).Persistence; persistence.CreateStoredProcedureCommand(null, "Customer", "Load"); persistence.AddParameter("@Id", this.Id); persistence.AddParameter("@PassPhrase", SoftFluent.Samples.EncryptAspect.PassPhrase.GetPassPhrase(), default(string)); System.Data.IDataReader reader = null; try { reader = persistence.ExecuteReader(); if ((reader.Read() == true)) { this.ReadRecord(reader, options); this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Unchanged; ret = true; } else { this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Deleted; } } finally { if ((reader != null)) { reader.Dispose(); } persistence.CompleteCommand(); } return(ret); }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { bool ret = false; if ((this.Id == -1)) { return(ret); } CodeFluent.Runtime.CodeFluentPersistence persistence = CodeFluentContext.Get(SoftFluent.Json.NET.Constants.SoftFluent_Json_NETStoreName).Persistence; persistence.CreateStoredProcedureCommand(null, "Publication", "Load"); persistence.AddParameter("@Id", this.Id, ((int)(-1))); System.Data.IDataReader reader = null; try { reader = persistence.ExecuteReader(); if ((reader.Read() == true)) { this.ReadRecord(reader, options); this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Unchanged; ret = true; } else { this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Deleted; } } finally { if ((reader != null)) { reader.Dispose(); } persistence.CompleteCommand(); } return(ret); }
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, "UserLogin_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); this._providerName = CodeFluentPersistence.GetReaderValue(reader, "UserLogin_ProviderName", ((string)(default(string)))); this._providerKey = CodeFluentPersistence.GetReaderValue(reader, "UserLogin_ProviderKey", ((string)(default(string)))); this._providerDisplayName = CodeFluentPersistence.GetReaderValue(reader, "UserLogin_ProviderDisplayName", ((string)(default(string)))); this.UserId = CodeFluentPersistence.GetReaderValue(reader, "UserLogin_User_Id", ((System.Guid)(CodeFluentPersistence.DefaultGuidValue))); } 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 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, "StockItem_Id", ((int)(-1))); this.PublicationId = CodeFluentPersistence.GetReaderValue(reader, "StockItem_Publication_Id", ((int)(-1))); this.SpaceId = CodeFluentPersistence.GetReaderValue(reader, "StockItem_Space_Id", ((int)(-1))); this._quantity = CodeFluentPersistence.GetReaderValue(reader, "StockItem_Quantity", ((int)(CodeFluentPersistence.DefaultInt32Value))); this._availableQuantity = CodeFluentPersistence.GetReaderValue(reader, "StockItem_AvailableQuantity", ((int)(CodeFluentPersistence.DefaultInt32Value))); } 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)); }
public virtual bool Reload(CodeFluent.Runtime.CodeFluentReloadOptions options) { bool ret = false; if ((this.ProviderKey == default(string))) { return(ret); } CodeFluent.Runtime.CodeFluentPersistence persistence = CodeFluentContext.Get(SoftFluent.Samples.AspNetIdentity1.Constants.SoftFluent_Samples_AspNetIdentity1StoreName).Persistence; persistence.CreateStoredProcedureCommand(null, "ExternalLogin", "Load"); persistence.AddParameter("@ProviderKey", this.ProviderKey); System.Data.IDataReader reader = null; try { reader = persistence.ExecuteReader(); if ((reader.Read() == true)) { this.ReadRecord(reader, options); this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Unchanged; ret = true; } else { this.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Deleted; } } finally { if ((reader != null)) { reader.Dispose(); } persistence.CompleteCommand(); } return(ret); }