示例#1
0
        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 { }));
        }
示例#2
0
 public async Task <ActionResult <int> > Create(CreateSellerCommand command)
 {
     return(await Mediator.Send(command));
 }