This project has moved and is read-only. For the latest updates, please go here.

How to set Value attributes?

Jul 21, 2014 at 10:52 AM

how can i set something like this with Camlex.NET?

<Value Type='DateTime' IncludeTimeValue='True'></Value>

with kind regards

Jul 22, 2014 at 12:09 PM
you should use DateTime's extension method IncludeTimeValue() declared in Camlex for this:
string s = Camlex.Query().Where(x => (DateTime)x["Foo"] == DateTime.Now.IncludeTimeValue()).ToString();
It will give the following CAML:
    <FieldRef Name="Foo" />
    <Value Type="DateTime" IncludeTimeValue="True">2014-07-22T14:07:54Z</Value>