문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top