Beispiel #1
0
        // ** Equality

        protected bool Equals(InvestmentVehicle other)
        {
            if (!_returnSeries.SequenceEqual(other._returnSeries))
            {
                return(false);
            }

            return(Number == other.Number && string.Equals(Name, other.Name) && Equals(InvestmentVehicleType, other.InvestmentVehicleType));
        }
Beispiel #2
0
        public InvestmentVehicle CreateEntity(
            InvestmentVehicleDto investmentVehicleDto)
        {
            var entity = new InvestmentVehicle
            {
                Number = investmentVehicleDto.InvestmentVehicleNumber,
                Name   = investmentVehicleDto.Name,
                InvestmentVehicleType = InvestmentVehicleType.FromCode(investmentVehicleDto.InvestmentVehicleTypeCode)
            };

            entity.AddReturnSeries(CreateReturnSeriesForEntity(investmentVehicleDto));

            return(entity);
        }