public CreateAlterationsOrderCommandTest() { InvalidCommand = new CreateAlterationsOrderCommand { CustomerName = "", CustomerEmail = "NotAnEmail", AlterationSize = 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)); }