Nucleus .Net Core CMS

Managers.IOrganizationManager Interface

Namespace: Nucleus.Abstractions.Managers
Assembly: Nucleus.Abstractions.dll
Provides functions to manage database data for Models.Organizations.

Remarks

Get an instance of this class from dependency injection by including a parameter in your class constructor.

Methods

CreateNew (Site) Method

CreateNew (Nucleus.Abstractions.Models.Site)
Create a new Models.Organization with default values.
Remarks
This function does not save the new Models.Organization to the database. Call Save to save the role group.

Get (Guid) Method

Get (Guid id)
Retrieve an existing Models.Organization from the database.
Parameters
Name Type
id Guid

GetByName (Site,String) Method

GetByName (Site site, String name)
Retrieve an existing Models.Organization from the database.
Parameters
Name Type
site Nucleus.Abstractions.Models.Site
name String

AddUser (Organization,OrganizationUser) Method

AddUser (Organization organization, OrganizationUser user)
Add the specified Models.User to the specified Models.Organization.
Remarks
Changes are saved to the database immediately.

RemoveUser (Organization,OrganizationUser) Method

RemoveUser (Organization organization, OrganizationUser user)
Removes the specified Models.Role to the specified Models.Organization.
Remarks
Changes are saved to the database immediately.

IsOrganizationMember (Organization,ClaimsPrincipal) Method

IsOrganizationMember (Organization organization, ClaimsPrincipal user)
Return whether the specified user is a member (or admin) of the specified organization.

IsOrganizationAdministrator (Organization,ClaimsPrincipal) Method

IsOrganizationAdministrator (Organization organization, ClaimsPrincipal user)
Return whether the specified user is an administrator of the specified organization.

List (Site) Method

List (Site site)
List all Models.Organizations which belong to the specified Models.Site.
Parameters
Name Type
site Nucleus.Abstractions.Models.Site

List (Site,PagingSettings) Method

List (Site site, PagingSettings pagingSettings)
List a page of Models.Organizations which belong to the specified Models.Site.

Search (Site,String,PagingSettings) Method

Search (Site site, String searchTerm, PagingSettings pagingSettings)
Returns a list of Models.Organizations which match the specified searchTerm.

Save (Site,Organization) Method

Save (Site site, Organization organization)
Create or update the specified Models.Organization.

Delete (Organization) Method

Delete (Organization organization)
Delete the specified Models.Organization from the database.
Parameters
Name Type
organization Nucleus.Abstractions.Models.Organization