I normally do something like this…
var theDogs = from d in db.Dogs where d.Equals(5) select d;
//LetThemOut(theDogs);
where db is the DataContext and Dogs is a table, but what about a View?
Is it the same?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it is the same. You just can’t insert/update/delete data in a view.
If you’re using the LINQ to SQL designer, just drag the view to the DBML designer.
If you’re using a manual mapping, just map the object you are defining to a view, instead of a table.