Is this a possibiliy?
-
I'm wondering if this is possible with LinqToSQL. I have a table, named Request Request have those 3 columns : ID, MessageID and State Example of data in the table : 1, 1, Completed 2, 1, Ready 3, 2, Completed 4, 2, Completed Let's say I want all request with the same message ID which have both their state set to completed. X| In this example I need : 3,2,Completed 4,2,Completed But not the first two because one of them does not have all their state set to completed. Is this possible with only LinqToSql (no stored proc)? :confused:
-
I'm wondering if this is possible with LinqToSQL. I have a table, named Request Request have those 3 columns : ID, MessageID and State Example of data in the table : 1, 1, Completed 2, 1, Ready 3, 2, Completed 4, 2, Completed Let's say I want all request with the same message ID which have both their state set to completed. X| In this example I need : 3,2,Completed 4,2,Completed But not the first two because one of them does not have all their state set to completed. Is this possible with only LinqToSql (no stored proc)? :confused:
Maybe I'm missing something, but shouldn't this work?
var matches = from request in RequestTable
where request.MessageId == 2 and request.State == State.Completed
select request;Life, family, faith: Give me a visit. From my latest post: "How differently the psalmist saw it! How blessed -- how truly happy with real joy! -- is the man who delights in the Law of the Lord." Judah Himango