documented alternative to fluent-style API
I'm not sure about you guys, but I really hate code like this:
01.
sf.Documents().GetManager().Provider.SuppressSecurityChecks =
true
;
02.
sf.Document().CreateNew().Do(item =>
03.
04.
item.Parent = sf.DocumentLibraries().Where(l => l.Title ==
"JobApplications"
).Get().FirstOrDefault();
05.
item.Title = title; item.UrlName = title +
"_Application"
;
06.
item.SetValue(
"FirstName"
, firstName);
07.
item.SetValue(
"LastName"
, lastName);
08.
item.SetValue(
"Phone"
, phone);
09.
item.SetValue(
"HowDidYouHear"
, howDidYouHear);
10.
).CheckOut().UploadContent(applicationFile.InputStream, applicationFile.GetExtension()).CheckInAndPublish();
11.
I guess in a lot of places, the developer documentation does have both examples. Just please make sure that you keep this practice.
Hi Eric,
Thank you for the remark.
We will keep providing both Fluent API and Native API examples. We will also try to explain the Fluent API as clearer as possible so that it is easy to understand how it is used and what are its advantages.
Greetings,
Radoslav Georgiev
the Telerik team