以下のように、クラス プロパティにバインドした SQL Server ストアド プロシージャを作成しました。
objSearchCustomerCDTO = DbContext.ExecuteStoreQuery<SearchCustomerCDTO>("exec GetSearchCustomerDetails").AsQueryable().ToList();
プロパティにバインドするためにストアド プロシージャを使用しただけであることに注意してください。
例:私のクラスには以下のプロパティがあります
public string CustomerName {get;set;}
およびストアド プロシージャの戻り値
Select c.CustomerName as CustomerName from Customer
CustomerName
今、私は含むものだけを表示したいbil
- そのために私はこのクエリを使用しましたが、なぜそれが常にnullなのかわかりません
var query = objSearchCustomerCDTO
.Where(c => c.CustomerName.Contains("bil")).ToList();
上記のクエリで間違っていることを教えてください。
ありがとう