Skip to content

Instantly share code, notes, and snippets.

View s6admin's full-sized avatar

SideSix s6admin

View GitHub Profile
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Web.Script.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core;
using Umbraco.Core.Events;
using Umbraco.Core.Models;
@JimBobSquarePants
JimBobSquarePants / CamelCase.cs
Last active January 5, 2019 09:55
Maps an instance of IPublishedContent to a strong typed Model. This would allow you to use models in your views and save logic. In your controller you should be able to use var MyModel = ModelMapper.Map<Type>(renderModel.Content); This could easily be turned into an extension method IPublishedContent. Based on the MVC separation article by Nick …
namespace UmbracoBootstrap.Infrastructure.Extensions
{
#region Using
using System.Diagnostics.CodeAnalysis;
#endregion
/// <summary>
/// Encapsulates a series of time saving extension methods to <see cref="T:System.String">String</see>s.
/// </summary>
public static class StringExtensions