public async Task <GetProductByIdResponseModel> GetProductById(GetProductByIdRequestModel productModel) { if (productModel == null) { throw new ArgumentNullException(nameof(productModel)); } var product = await _inMemoryStorage.Get <Product>(productModel.ProductId).ConfigureAwait(false); return(new GetProductByIdResponseModel { Id = product.Id, CategoryId = product.CategoryId, Description = product.Description, Name = product.Name, UserId = product.UserId, }); }