Nucleus .Net Core CMS

Managers.IOrganizationManager Interface

Namespace: Nucleus.Abstractions.Managers
Assembly: Nucleus.Abstractions.dll
Provides functions to manage database data for Models.Organizations.
Get an instance of this class from dependency injection by including a parameter in your class constructor.
AddUser (Organization organization, OrganizationUser user)
Add the specified Models.User to the specified Models.Organization.
Remarks
Changes are saved to the database immediately.
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.
Delete (Organization organization)
Delete the specified Models.Organization from the database.
Parameters
Name Type
organization Nucleus.Abstractions.Models.Organization
Get (Guid id)
Retrieve an existing Models.Organization from the database.
Parameters
Name Type
id Guid
GetByName (Site site, String name)
Retrieve an existing Models.Organization from the database.
Parameters
Name Type
site Nucleus.Abstractions.Models.Site
name String
IsOrganizationAdministrator (Organization organization, ClaimsPrincipal user)
Return whether the specified user is an administrator of the specified organization.
IsOrganizationMember (Organization organization, ClaimsPrincipal user)
Return whether the specified user is a member (or admin) of the specified organization.
List (Site site)
List all Models.Organizations which belong to the specified Models.Site.
Parameters
Name Type
site Nucleus.Abstractions.Models.Site
List (Site site, PagingSettings pagingSettings)
List a page of Models.Organizations which belong to the specified Models.Site.
RemoveUser (Organization organization, OrganizationUser user)
Removes the specified Models.Role to the specified Models.Organization.
Remarks
Changes are saved to the database immediately.
Save (Site site, Organization organization)
Create or update the specified Models.Organization.
Search (Site site, String searchTerm, PagingSettings pagingSettings)
Returns a list of Models.Organizations which match the specified searchTerm.