C# Class Rock.Model.SiteService

The data access/service class for the Rock.Model.Site entity. This inherits from the Service class
Mostrar archivo Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
CanDelete ( Site item, string &errorMessage, bool includeSecondLvl ) : bool

Determines whether the specified site can be deleted. Performs some additional checks that are missing from the auto-generated SiteService.CanDelete(). TODO This should move into the SiteService CanDelete at some point once the generator tool is adjusted.

GetByDefaultPageId ( int defaultPageId ) : IQueryable

Returns a collection of Rock.Model.Site entities that by their Default Page's PageId.

GetGuid ( int id ) : Guid?

Gets the Guid for the Site that has the specified Id

Method Details

CanDelete() public method

Determines whether the specified site can be deleted. Performs some additional checks that are missing from the auto-generated SiteService.CanDelete(). TODO This should move into the SiteService CanDelete at some point once the generator tool is adjusted.
public CanDelete ( Site item, string &errorMessage, bool includeSecondLvl ) : bool
item Site The item.
errorMessage string The error message.
includeSecondLvl bool If set to true, verifies that there are no site layouts with any existing pages.
return bool

GetByDefaultPageId() public method

Returns a collection of Rock.Model.Site entities that by their Default Page's PageId.
public GetByDefaultPageId ( int defaultPageId ) : IQueryable
defaultPageId int An containing the Id of the default to search by. This /// value is nullable.
return IQueryable

GetGuid() public method

Gets the Guid for the Site that has the specified Id
public GetGuid ( int id ) : Guid?
id int The identifier.
return Guid?