Month: December 2019

Strongly-typed access to EPiSever properties using generics and extension methods

When building an EPiServer template, a common task is to retrieve the value of a property before showing it on the page. This property could be of any type and may even be null if the content editor has not supplied a value. On our early EPiSever projects it was typical to find a utility method similar to that below, which would help to avoid NullReferenceExceptions

Read More “Strongly-typed access to EPiSever properties using generics and extension methods”