public async Task <ActionResult <MetricResource> > CreateMetricAsync(AddMetricCommand metricCommand) { var metricResource = await _mediator.Send(metricCommand); return(CreatedAtAction( nameof(GetMetricAsync), new { metricId = metricResource.Id, version = RequestedApiVersion }, metricResource)); }
public async Task <ActionResult> AddMetric(AddMetricCommand command) { var metricId = await _mediator.SendAsync(command); return(Created("", metricId)); }