Categories

Archives

Troubleshoot: SPPropertyBag can not deserialize complex type.

  English: In SharePoint, there is SPPropertyBag which can stores arbitrary key-and-value pairs into configuration database. And this is very good location compared with web.config. Moreover we can also create our custom class from SPPersistedObject to persist it state in a permanent store and retrieve it for later usage. (see MSDN refence SPPersistedObject) But don’t be so happy [...] [read more...]

Howto: Use lambda expression in SharePoint Object Model – Working with WebApplication

English Before you continue reading this post, I hope you have read the basic task to start using lambda expression in SOM here. A. Find existing job definition, named “Change Log” SPWebApplication spWebApplication = SPContext.Current.Site.WebApplication; var jobs = spWebApplication.JobDefinitions.Where(x => x.Title == "Change Log"); foreach(SPJobDefinition job in [...] [read more...]

Howto: Use lambda expression in SharePoint Object model

English Lambda expression has been introduced since .NET framework 3.5, it is an anonymous function that can contain statement and expression. For more understanding on lambda expression you can read directly in MSDN page here. I will assume that you have read the topic and you can remember the lambda simply as: (input parameters ) => operation We [...] [read more...]