public async Task <IActionResult> GetAssetById(int assetId) { var getAssetQuery = new GetAssetQuery(assetId); var result = await mediator.Send(getAssetQuery); return(StatusCode((int)result.Code, result.Value)); }
public async Task <ActionResult <AssetModel> > GetAsset(Guid id) { var query = new GetAssetQuery { Id = id }; return(await ExecuteRequest(query).ConfigureAwait(false)); }
public async Task <IActionResult> Get([FromQuery] GetAssetQuery request) { var response = await _mediator.Send(request); return(Ok(response)); }