コード例 #1
0
        public virtual async Task UpdateReportAsync(ReportEditDto input)
        {
            //TODO:更新前的逻辑判断,是否允许更新

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

            input.MapTo(entity);

            await _reportRepository.UpdateAsync(entity);
        }
コード例 #2
0
        public virtual async Task <ReportEditDto> CreateReportAsync(ReportEditDto input)
        {
            //TODO:新增前的逻辑判断,是否允许新增

            var entity = input.MapTo <Core.CustomDomain.Report.Report>();

            entity = await _reportRepository.InsertAsync(entity);

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