예제 #1
0
        /// <summary>
        ///     新增依赖项
        /// </summary>
        /// <param name="dependencyPnReg">依赖项附件</param>
        /// <returns>依赖项</returns>
        public Dependency AddNewDependency(PnReg dependencyPnReg)
        {
            var dependency = new Dependency
            {
                InstallControllerId = Id,
            };
            dependency.GenerateNewIdentity();
            dependency.SetPnReg(dependencyPnReg);

            return dependency;
        }
예제 #2
0
        /// <summary>
        ///     更新依赖项
        /// </summary>
        /// <param name="dependencyDto">依赖项DTO</param>
        /// <param name="dependency">依赖项</param>
        private void UpdateDependency(DependencyDTO dependencyDto, Dependency dependency)
        {
            //获取
            PnReg pnReg = _pnRegRepository.Get(dependencyDto.DependencyPnId);

            dependency.SetPnReg(pnReg);
        }