コード例 #1
0
        public async Task <IWrappedResponse> Create(CustomerDivisionCreateRequest request)
        {
            var cmd = ServiceCommand <CustomerDivision, Rules.CustomerDivision.Create.MainRule>
                      .Create(_serviceProvider)
                      .When(new Rules.CustomerDivision.Create.MainRule(request))
                      .Then(CreateAction);

            return(await cmd.Execute());
        }
コード例 #2
0
 public Task <ActionResult <CustomerDivision> > Post([FromBody] CustomerDivisionCreateRequest request)
 {
     return(_divisionsService.Create(request).Convert <CustomerDivision>(this));
 }
コード例 #3
0
 public MainRule(CustomerDivisionCreateRequest request, IRule parentRule = null)
 {
     // Create Context
     Context    = new ContextModel(request, this);
     ParentRule = parentRule;
 }