public async Task <ActionResult <CustomerDocumentSettings> > Post([FromForm] string values)
        {
            var request = new CustomerDocumentSettingCreateRequest();

            JsonConvert.PopulateObject(values, request);
            return(await _customerDocumentSettingsService.Create(request).Convert <CustomerDocumentSettings>(this));
        }
        public async Task <IWrappedResponse> Create(CustomerDocumentSettingCreateRequest request)
        {
            var cmd = ServiceCommand <CustomerDocumentSettings, Rules.CustomerDocumentSetting.Create.MainRule>
                      .Create(_serviceProvider)
                      .When(new Rules.CustomerDocumentSetting.Create.MainRule(request))
                      .Then(CreateAction);

            return(await cmd.Execute());
        }
示例#3
0
 public MainRule(CustomerDocumentSettingCreateRequest request, IRule parentRule = null)
 {
     // Create Context
     Context    = new ContextModel(request, this);
     ParentRule = parentRule;
 }