Example #1
0
        // this would take a PageResource but there seems to be a binding bug in the version
        // of OpenRasta that I'm using at this point in time
        public OperationResult.SeeOther Post(string title, string content)
        {
            var resource = new PageResource
                               {
                                   Title = title, 
                                   Content = content,
                                   TransformedContent = markdown.Transform(content)
                               };
            

            pageRepository.Save(resource);

            var redirectLocation = uriResolver.CreateUriFor(context.ApplicationBaseUri,
                                                            typeof (PageResource), null,
                                                            resource.ToNameValueCollection());

            return new OperationResult.SeeOther
                       {
                           RedirectLocation = redirectLocation
                       };
        }