0
カテゴリに基づいて商品のリストを返すために、次のコードを書いています。web API GETメソッドで複数のパラメータを渡す
public IEnumerable<Product> GetProductsByCategoryId(string category_id)
{
return repository.GetAll().Where(
p => string.Equals(p.Category, category_id, StringComparison.OrdinalIgnoreCase));
}
メソッド、カテゴリ、ブランドに2つのパラメータを渡したいとします。
public IEnumerable<Product> GetProductsByCategoryBrand(string category, string Brand)
{
}
カテゴリとブランドの返品方法はどのように見えますか?
具体的な問題を明確にしたり、詳細を追加して必要なものを正確に強調してください。現在書かれているとおり、あなたが求めていることを正確に伝えるのは難しいです。この質問を明らかにするには、[How to Ask](http://stackoverflow.com/help/how-to-ask)ページを参照してください。 – Nkosi