public async Task <CreateComplaintVm> Create(CreateComplaintCommand command) { return(await Mediator.Send(command)); }
public async Task <ActionResult> CreateComplaint([FromBody] CreateComplaintCommand createComplaintCommand, ApiVersion apiVersion) { var newComplaintId = await Mediator.Send(createComplaintCommand); return(CreatedAtAction(nameof(GetComplaint), new { complaintId = newComplaintId, version = apiVersion.ToString() }, new { id = newComplaintId })); }
public async Task <ActionResult <int> > Create(CreateComplaintCommand command) { return(await Mediator.Send(command)); }