私が持っているストアド プロシージャと同等の linq ステートメントを作成しようとしています。私が持っているものは結果を返さないので、どこかが間違っているに違いないと思います。
私がこれまでに持っているもの
from r in context.View
where ValOne== null ? false : r.ColOne.Equals(ValOne) &&
ValTwo == null ? false : r.ColTwo.Equals(ValTwo) &&
(r.ODate >= Start && r.ODate <= End)
select r
linqに変更したいもの
select * from View
Where (@ValOne is null or ColOne = @ValOne)
and (@ValTwo is null or ColTwo = @ValTwo)
and (@Start is null or ODate between @Start and @End)