Exemplo n.º 1
0
        public virtual async Task UpdateCompanyApplicationAsync(CompanyApplicationEditDto input)
        {
            //TODO:更新前的逻辑判断,是否允许更新

            var entity = await _companyApplicationRepository.GetAsync(input.Id.Value);

            input.MapTo(entity);

            await _companyApplicationRepository.UpdateAsync(entity);
        }
Exemplo n.º 2
0
        public virtual async Task <CompanyApplicationEditDto> CreateCompanyApplicationAsync(
            CompanyApplicationEditDto input)
        {
            //TODO:新增前的逻辑判断,是否允许新增

            var entity = input.MapTo <CompanyApplication>();

            entity = await _companyApplicationRepository.InsertAsync(entity);

            return(entity.MapTo <CompanyApplicationEditDto>());
        }