Beispiel #1
0
 public CreateAlterationsOrderCommandTest()
 {
     InvalidCommand = new CreateAlterationsOrderCommand
     {
         CustomerName   = "",
         CustomerEmail  = "NotAnEmail",
         AlterationSize = 0
     };
 }
Beispiel #2
0
        public async Task <IActionResult> Create([FromBody] CreateAlterationsOrderCommand createAlterationCommand)
        {
            if (createAlterationCommand is null)
            {
                return(BadRequest($"{nameof(createAlterationCommand)} must be valid"));
            }

            var alteration = await this._mediator.Send(createAlterationCommand);

            return(Created(alteration.Id.ToString(), alteration));
        }