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()); }
public Task <ActionResult <CustomerDivision> > Post([FromBody] CustomerDivisionCreateRequest request) { return(_divisionsService.Create(request).Convert <CustomerDivision>(this)); }
public MainRule(CustomerDivisionCreateRequest request, IRule parentRule = null) { // Create Context Context = new ContextModel(request, this); ParentRule = parentRule; }