Similarly you can do a IN like filter in LINQ:
SELECT * FROM MemberInfomation WHERE @samAccount IN ('adf','asfd','wqewe')
Got help from here.
public ListGetInformation(String[] samAccounts)
{
SomeDataContextdc = new SomeDataContext();
return dc.MemberInfomation.Where(
o => samAccounts.Contains(o.samaccount)
).ToList();
}
No comments:
Post a Comment