###Mapping Umbraco content to Strongly typed models
Every document type in Umbraco should be reflected in a strongly typed model. Example:Article(Document type) --> ArticleModel(Strongly typed model)
Heritage in Umbraco document types should be reflected in our models.
Every view should have an assigned View Model.
Every View Model should inherit from a common view model (CommonViewModel).
The common view model should contain global properties.
Add the patterns to the find and replace dialog in Visual Studio for ultimate win. Replace in entire solution for more ultimate win.
#Matching pattern
_?ModelFactory\.Create<([a-z]+)>\((_?[a-z]+\.?[a-z]+?)\)
#Replacement pattern
###Managing Database Logins -- first, connect to the master database ####Create Login
CREATE LOGIN login1 WITH password='<ProvidePassword>';
####Create User Remember to run the queries below on the actual database (Right click the database and select "New Query")
<div class="modules"> | |
<div class="module_container"> | |
<div class="module"></div> | |
</div> | |
<div class="module_container"> | |
<div class="module"></div> | |
</div> | |
<div class="module_container"> | |
<div class="module"></div> | |
</div> |
<div class="modules"> | |
<div class="module"></div> | |
<div class="module"></div> | |
<div class="module"></div> | |
</div> |
<div class="modules"> | |
<div class="module_container"> | |
<div class="module"></div> | |
</div> | |
<div class="module_container"> | |
<div class="module"></div> | |
</div> | |
<div class="module_container"> | |
<div class="module"></div> | |
</div> |
<article> | |
<ul> | |
<li></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
</ul> | |
</article> |
using System; | |
using System.ComponentModel; | |
using System.Globalization; | |
using System.Linq; | |
using nuPickers; | |
using Our.Umbraco.Ditto; | |
namespace MyProject.TypeConverters | |
{ | |
/// <summary> |
using System.Collections.Generic; | |
using System.Linq; | |
using MyProject.Models; | |
using Our.Umbraco.Ditto; | |
using Umbraco.Web; | |
using Umbraco.Web.WebApi; | |
namespace MyProject.Controllers.WebApi | |
{ | |
public class FeaturedArticlesController : UmbracoApiController |