public void Delete() { if (pageDefinition.IsNull()) { return; } log.DebugFormat("Deleting page definition named {0} from page type with id {1}", pageDefinition.Name, pageDefinition.PageTypeID); context.PageDefinitionRepository.Delete(pageDefinition); }
public PageDefinitionAction PageDefinition(string name) { PageDefinition pageDefinition = null; if (pageType.IsNotNull()) { pageDefinition = pageType.Definitions.Find(d => d.Name == name); if (pageDefinition.IsNull()) { log.WarnFormat( "Tried to retrieve page definition named {0} from page type {1} but the page type" + " does not have a page definition by that name.", name, pageDefinition); } } return(new PageDefinitionAction(pageDefinition, context)); }