RazorEngine extension methods in a template
===

I am using the Razor engine: https://github.com/Antaris/RazorEngine.

I am creating a model dynamically. I'm trying to include a extension method in a template but it inst recognising the extension class. I am receiving the following error message " **'string' does not contain a definition for 'ToUpperFirstLetter'** "

**Model Creation**

    dynamic model = new ExpandoObject();
    ((IDictionary<string, object>)model).Add("Forename", "john");

**Template**

    @using Namespace.Extensions
    @{
         ViewBag.Title = "Title";
    }

    Hello @Model.Forename.ToUpperFirstLetter()

**Extension Class**

    namespace Namespace.Extensions
    {
        public static class StringExtensions
        {
             public static string ToUpperFirstLetter(this string source)
             {
                 return ....removed for abbreviation
             }
        }
    }


**Razor Parsing**

    ITemplate template = Razor.Resolve(template, model);
    string result = template.Run();