Multiple Where's support

Jan 12, 2016 at 3:20 PM
Edited Jan 12, 2016 at 3:23 PM
Hello! i find your project very good and easy to use
and plan to include sources to my project SharePointCommon for support LINQ queries.

But now i find one issue:
code:
var c = new Caml<Employee>()
   .Where(e => e.FirstName == "fn")
   .Where(e => e.LastName == "ln");
produces CAML:
<View>    
<Query>
      <Where>
        <Eq><FieldRef Name="Last_x0020_Name" /><Value Type="Text">ln</Value>
        </Eq>
      </Where>
    </Query>
</View>
But, i think, it should be like this:
<View>
    <Query>
      <Where>
         <And>
          <Eq>
              <FieldRef Name="First_x0020_Name" /><Value Type="Text">fn</Value>
         </Eq>
         <Eq>
              <FieldRef Name="Last_x0020_Name" /><Value Type="Text">ln</Value>
        </Eq>
      </Where>
    </Query>
</View>
Can you fix this?
Jan 13, 2016 at 2:34 AM
@devi,

Indeed, I'll add support for multiple 'Where' conditions. I'll target this weekend.

Thanks!
Handy
(Note: this is my Codeplex office account)
Jan 13, 2016 at 2:52 PM
Edited Jan 13, 2016 at 2:53 PM
Hi @HTT323, Thank you for response!

I am already find work around by using multiple AndAlso methods instead of Where.

Do you can implement Skip method instead of this?
Jan 14, 2016 at 2:02 AM
Hi @devi,

Ah, yes, I forgot to mention that AndAlso and OrElse are already in place.

The reason why I don't have skip is because SharePoint doesn't support skip (correct me if I'm wrong).

Regards,
Handy