public async Task <IActionResult> Post([FromBody] CreateSellerCommand command) { if (!this.ModelState.IsValid) { return(this.BadRequest(this.ModelState)); } var response = await this._mediator.Send(command); return(this.Created(Url.RouteUrl("GetSellerById", new { id = response.Id }), new { })); }
public async Task <ActionResult <int> > Create(CreateSellerCommand command) { return(await Mediator.Send(command)); }