Beispiel #1
0
        /// <summary>
        ///     创建飞机系列
        /// </summary>
        /// <param name="id">飞机系列ID</param>
        /// <param name="name">飞机系列名称</param>
        /// <param name="manufacturerId">制造商</param>
        /// <returns></returns>
        public static AircraftSeries CreateAircraftSeries(Guid id, string name, Guid manufacturerId)
        {
            var aircraftSerise = new AircraftSeries { Name = name };
            aircraftSerise.ChangeCurrentIdentity(id);
            aircraftSerise.ManufacturerId = manufacturerId;

            return aircraftSerise;
        }
Beispiel #2
0
        /// <summary>
        ///     设置飞机系列
        /// </summary>
        /// <param name="aircraftSeries">飞机系列</param>
        public void SetAircraftSeries(AircraftSeries aircraftSeries)
        {
            if (aircraftSeries == null)
            {
                throw new ArgumentException("飞机系列参数为空!");
            }

            AircraftSeries = aircraftSeries;
            AircraftSeriesId = aircraftSeries.Id;
        }