public virtual void RemoveAnnualTransactionVolumes(AnnualTransactionVolume __item) { if (__item != null) { InternalRemoveAnnualTransactionVolumes(__item); } }
public virtual void AddAnnualTransactionVolumes(AnnualTransactionVolume __item) { if (__item == null) { return; } InternalAddAnnualTransactionVolumes(__item); }
public virtual void AddAtIndexAnnualTransactionVolumes(int index, AnnualTransactionVolume __item) { if (__item == null) { return; } annualTransactionVolumes?.Insert(index, __item); }
public virtual void InternalRemoveAnnualTransactionVolumes(AnnualTransactionVolume __item) { if (__item == null) { return; } annualTransactionVolumes?.Remove(__item); }
public virtual void InternalAddAnnualTransactionVolumes(AnnualTransactionVolume __item) { if (__item == null || disableInternalAdditions) { return; } annualTransactionVolumes?.Add(__item); }
public virtual void SetAnnualTransactionVolumesAt(AnnualTransactionVolume __item, int __index) { if (__item == null) { annualTransactionVolumes[__index] = null; } else { annualTransactionVolumes[__index] = __item; } }
public void Investor_persistence_test() { DateTime now = DateTime.Now; // Get datetime without milliseconds now = new DateTime(now.Ticks - (now.Ticks % TimeSpan.TicksPerSecond), now.Kind); var _agreement_agreements_investor = new DSS5_SupplyChainFinancialsOptimisation.BO.Agreement { StartDate = now, EndDate = now, FundedRate = 222222.22M, FundedAmount = 222222.22M, CurrentAgreementStatus = "Agreement_CurrentAgreementStatus", InterestRate = 222222.22M, }; var _agreement_agreements_investor2 = new DSS5_SupplyChainFinancialsOptimisation.BO.Agreement { StartDate = now, EndDate = now, FundedRate = 222222.22M, FundedAmount = 222222.22M, CurrentAgreementStatus = "Agreement_CurrentAgreementStatus", InterestRate = 222222.22M, }; var _investor_annualtransactionvolumes_investor = new DSS5_SupplyChainFinancialsOptimisation.BO.AnnualTransactionVolume { Volume = 222222.22M, Year = 4594, }; var _investor_annualtransactionvolumes_investor2 = new DSS5_SupplyChainFinancialsOptimisation.BO.AnnualTransactionVolume { Volume = 222222.22M, Year = 165, }; new PersistenceSpecification <DSS5_SupplyChainFinancialsOptimisation.BO.Investor>(Session) .CheckProperty(p => p.InvestorId, 1919) .CheckProperty(p => p.PrimaryPhone, "Investor_PrimaryPhone") .CheckProperty(p => p.SecondaryPhone, "Investor_SecondaryPhone") .CheckProperty(p => p.Fax, "Investor_Fax") .CheckProperty(p => p.WebSite, "Investor_WebSite") .CheckProperty(p => p.Company, "Investor_Company") .CheckProperty(p => p.ContactPerson, "Investor_ContactPerson") .CheckProperty(p => p.Logo, "Investor_Logo") .CheckProperty(p => p.SupervisingAuthority, "Investor_SupervisingAuthority") .CheckProperty(p => p.RegistrationNo, "Investor_RegistrationNo") .CheckProperty(p => p.DomainFocus, "Investor_DomainFocus") .CheckProperty(p => p.TurnOver, 2222222222.22222M) .CheckProperty(p => p.VatNumber, "Investor_VatNumber") .CheckProperty(p => p.AddressTwo, "Investor_AddressTwo") .CheckProperty(p => p.AddressOne, "Investor_AddressOne") .CheckProperty(p => p.ManagingDirector, "Investor_ManagingDirector") .CheckProperty(p => p.TargetMarket, "Investor_TargetMarket") .CheckProperty(p => p.CustomerSizeFrom, "Investor_CustomerSizeFrom") .CheckProperty(p => p.CustomerSizeTo, "Investor_CustomerSizeTo") .CheckProperty(p => p.LocalJurisdiction, "Investor_LocalJurisdiction") .CheckProperty(p => p.CommercialRegNo, "Investor_CommercialRegNo") .CheckProperty(p => p.OtherMinRequirements, "Investor_OtherMinRequirements") .CheckProperty(p => p.CRR, true) .CheckProperty(p => p.UploadCompliance, "Investor_UploadCompliance") .CheckProperty(p => p.OtherMemberships, "Investor_OtherMemberships") .CheckProperty(p => p.OtherDomainFocus, "Investor_OtherDomainFocus") .CheckProperty(p => p.InvestorStatus, "Investor_InvestorStatus") .CheckProperty(p => p.IAFC, true) .CheckProperty(p => p.Prefix, "Investor_Prefix") .CheckProperty(p => p.UserName, "b132c423-de8e-4751-9982-12ebb00304f2Investor_UserName") .CheckProperty(p => p.PasswordHash, "Investor_PasswordHash") .CheckProperty(p => p.SecurityStamp, "Investor_SecurityStamp") .CheckProperty(p => p.EmailConfirmed, true) .CheckProperty(p => p.LockoutEnabled, true) .CheckProperty(p => p.PhoneNumberConfirmed, true) .CheckProperty(p => p.TwoFactorEnabled, true) .CheckProperty(p => p.AccessFailedCount, 7777) .CheckProperty(p => p.Name, "Investor_Name") .CheckProperty(p => p.Email, "Investor_Email") .CheckProperty(p => p.PhoneNumber, "Investor_PhoneNumber") .CheckProperty(p => p.LockoutEndDate, now) .CheckBag(p => p.Agreements, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.Agreement> { _agreement_agreements_investor, _agreement_agreements_investor2 })) .CheckBag(p => p.AnnualTransactionVolumes, (new List <DSS5_SupplyChainFinancialsOptimisation.BO.AnnualTransactionVolume> { _investor_annualtransactionvolumes_investor, _investor_annualtransactionvolumes_investor2 })) .VerifyTheMappings(); }
/// <summary> /// Returns true if self and the provided entity have the same Id values /// and the Ids are not of the default Id value /// </summary> protected bool HasSameNonDefaultIdAs(AnnualTransactionVolume compareTo) { return(!this.IsTransient() && !compareTo.IsTransient() && this.Id.Equals(compareTo.Id)); }
/// <summary> /// Copies the current object to a new instance /// </summary> /// <param name="deep">Copy members that refer to objects external to this class (not dependent)</param> /// <param name="copiedObjects">Objects that should be reused</param> /// <param name="asNew">Copy the current object as a new one, ready to be persisted, along all its members.</param> /// <param name="reuseNestedObjects">If asNew is true, this flag if set, forces the reuse of all external objects.</param> /// <param name="copy">Optional - An existing [AnnualTransactionVolume] instance to use as the destination.</param> /// <returns>A copy of the object</returns> public virtual AnnualTransactionVolume Copy(bool deep = false, Hashtable copiedObjects = null, bool asNew = false, bool reuseNestedObjects = false, AnnualTransactionVolume copy = null) { if (copiedObjects == null) { copiedObjects = new Hashtable(); } if (copy == null && copiedObjects.Contains(this)) { return((AnnualTransactionVolume)copiedObjects[this]); } copy = copy ?? new AnnualTransactionVolume(); if (!asNew) { copy.TransientId = this.TransientId; copy.Id = this.Id; } copy.Volume = this.Volume; copy.Year = this.Year; if (!copiedObjects.Contains(this)) { copiedObjects.Add(this, copy); } return(copy); }