Exemplo n.º 1
0
        /// <summary>
        /// 创建操作
        /// </summary>
        /// <param name="request">请求</param>
        public async Task <Guid> CreateAsync(CreateOperationRequest request)
        {
            var operation = request.ToOperation();

            await ValidateCreateAsync(operation);

            operation.Init();
            await OperationRepository.AddAsync(operation);

            await UnitOfWork.CommitAsync();

            return(operation.Id);
        }