public override async Task <ProductDto> GetProduct(ProductIdDto request, ServerCallContext context) { var product = await _productApplication.GetProductAsync(request.Id); var result = product == null ? null : product.ToProductDto(); return(result); }
public override async Task <UpdatedResultDto> Delete(ProductIdDto request, ServerCallContext context) { var result = await _productApplication.DeleteProduct(request.Id); return(new UpdatedResultDto() { Count = result }); }