1

my request: "http://hostname/sample/getrecord?appid=1&domain=physics,chemistry&platform=cs,ece"

How to query in linq to sql like "IN" statement in sqlserver 2008. How to send multiple parameters of same column as string to SP in linq to sql. Please help me out....

0

1 Answer 1

3

Perhaps you want something like:

string domain = "physics,chemistry";
string[] domains = domain.Split(',');

var records = context.Records.Where(r => domains.Contains(r.Domain)).ToList();

(assuming that Domain is a string property in entity Record)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.