The easiest way to map Sitecore data to code.
Glass.Mapper.Sc allows you to move your data from Sitecore and into your code seamlessly using strongly typed objects.
The framework allows you to map data on to c# classes and interfaces without any additional mark-up. As the data is mapped to your target objects it is converted to the target type. Take a look at this simple example:
public class Demo { public virtual Guid Id { get; set; } public virtual string Title { get; set; } public virtual DateTime Date { get; set; } public virtual string Url { get; set; } } public class DemoController : Controller { public ActionResult Index(){ var mvcContext = new MvcContext(); var model = mvcContext.GetCurrentItem<Demo>(); var url = model.Url; return View(model); } }
To find out more about how to use Glass.Mapper.Sc view the free lectures from our Training Course.
Use your own models and Glass interfaced services to make your solutions more testable and resilient.
Map directly to and from standard .Net types such as string, int and float, IEnumerable and your own types!
Glass.Mapper has a large community of enthusiastic developers who contribute ideas and support each other.
Use Pipelines to customise how Glass.Mapper maps your data to your models. Giving you full flexibility in your solution.
Glass.Mapper is designed and optimised for Sitecore, helping you deliver bigger and better solutions.
Keep your models simple, clean and easy to read by making use of Plain Old C# objects.
Generate your models automatically using tools like TDS or write them by hand because they are so simple.
Glass.Mapper is a mature project first released in 2013 and with nearly 1,000,000 downloads.
Glass.Mapper has over 750 unit tests to ensure the quality and stability of the solution.
A fully featured ORM that allows you to read and write data to your preferred CMS.