Пример #1
0
        /// <summary>
        /// 编辑Form
        /// </summary>
        protected virtual async Task Update(FormEditDto input)
        {
            var entity = await _formRepository.GetAsync(input.Id);

            input.MapTo(entity);
            await _formRepository.UpdateAsync(entity);
        }
Пример #2
0
        /// <summary>
        /// 新增Form
        /// </summary>
        protected virtual async Task <FormEditDto> Create(FormEditDto input)
        {
            var entity = input.MapTo <Form>();

            entity = await _formRepository.InsertAsync(entity);

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