Class OrganizationRepository
Organization repository memory implementation
Inheritance
System.Object
OrganizationRepository
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.TenantSystem.Data.Memory
Assembly: Simplic.TenantSystem.Data.Memory.dll
Syntax
public class OrganizationRepository : IOrganizationRepository
Constructors
| Improve this Doc View SourceOrganizationRepository()
Initialize repository
Declaration
public OrganizationRepository()
Fields
| Improve this Doc View Sourceorganizations
Declaration
public IList<Organization> organizations
Field Value
Type | Description |
---|---|
System.Collections.Generic.IList<Organization> |
Methods
| Improve this Doc View SourceDelete(Organization)
Delete organization
Declaration
public bool Delete(Organization obj)
Parameters
Type | Name | Description |
---|---|---|
Organization | obj | Object instance |
Returns
Type | Description |
---|---|
System.Boolean | True if successfuk |
Delete(Guid)
Delete organization by id
Declaration
public bool Delete(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique id |
Returns
Type | Description |
---|---|
System.Boolean | True if successfuk |
Get(Guid)
Gets an organization by its id
Declaration
public Organization Get(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique organization id |
Returns
Type | Description |
---|---|
Organization | organization instance |
GetAll()
Get all organizations
Declaration
public IEnumerable<Organization> GetAll()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Organization> | Enumerable of organizations |
GetByName(String)
Declaration
public Organization GetByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
Organization |
GetByUserId(Int32)
Get all assigned organizations
Declaration
public IEnumerable<Organization> GetByUserId(int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | Unique user id |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Organization> | Get all tenants that are enabled for the given user |
GetGroupsBySubOrganizationCount(Int32)
Gets all groups which have n sub items/organizations
Declaration
public IEnumerable<Organization> GetGroupsBySubOrganizationCount(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | Sub organization count |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Organization> | Enumerable of organizations |
Save(Organization)
Save existing or new organization
Declaration
public bool Save(Organization obj)
Parameters
Type | Name | Description |
---|---|---|
Organization | obj | organization instance |
Returns
Type | Description |
---|---|
System.Boolean | True if successfuk |
Implements
IRepositoryBase<, >