Retrieves masters from the database.
A database may define a number of masters.
A master is an instance of a template much like an item. When an item is created from a master, the master is copied into the new item which receives all the field values from the master. A master may contain subitems that are created whenever an item is created from a master.
Masters can be retrieved either using their ID or by their name.
This example creates a new item.
public Item AddItem(Item parent, string name) {
Item result = null;
MasterItem master = Sitecore.Context.Database.Masters["Document"];
if (master != null) {
result = parent.Add(name, master);
}
return result;
}
Database Class | Sitecore.Data Namespace