Click or drag to resize

MasterController Methods

The MasterController type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCheckUpdateAndInitEventsForAllCustomerDatabases
Updates the database schema for all the registered customer databases.
Public methodConvertId(Int32, ConfigurationObjectType)
Converts the integer id of an object to its transport-safe unique id (UId).
(Inherited from ControllerBase.)
Public methodConvertId(String, ConfigurationObjectType)
Converts a string representation of an integer or Guid id to an integer id.
(Inherited from ControllerBase.)
Public methodConvertId(Guid, ConfigurationObjectType, Boolean)
Converts the transport-safe unique id (UId) of an object to its integer id.
(Inherited from ControllerBase.)
Public methodConvertIds(IEnumerableGuid, ConfigurationObjectType)
Converts the transport-safe unique ids (UId) of a number of objects to integer ids.
(Inherited from ControllerBase.)
Public methodConvertIds(IEnumerableInt32, ConfigurationObjectType)
Converts the integer ids of a number of objects to their transport-safe unique ids (UId).
(Inherited from ControllerBase.)
Public methodStatic memberDatabaseMajorMinorServiceCheck
Performs a check in the application version versus the database version. Throws an exception in case of a mismatch.
Public methodStatic memberDatabasePatchCheck
Public methodStatic memberDatabaseUpdate
Updates the database schema for the provided customer database.
Public methodDeleteOldActLogEntries
Deletes old items in tblActLog.
Public methodDeleteOldEventLogEntries
Deletes old items in tblActLog.
Public methodDoInConnection(ControllerBaseActionWithNoResult)
Executes an action that doesn't return a result. If no current connection exists, it will establish a connection to the database and close it afterwards. An existing connection will be reused. Inside the action, the connection is available as DbConnection.
(Inherited from ControllerBase.)
Public methodDoInConnection(ActionSqlConnection, SqlTransaction, Boolean)
Executes an action that doesn't return a result. If no current connection exists, it will establish a connection to the database and close it afterwards. Connection and Transaction are passed to delegate, to allow passing to other controllers An existing connection will be reused. Inside the action, the connection is available as DbConnection. To ensure a new connection set forceNew to true.
(Inherited from ControllerBase.)
Public methodDoInConnectionT(ControllerBaseActionWithResultT)
Executes an action and returns the result. If no current connection exists, it will establish a connection to the database and close it afterwards. An existing connection will be reused. Inside the action, the connection is available as DbConnection.
(Inherited from ControllerBase.)
Public methodDoInTransaction(ControllerBaseActionWithNoResult)
Executes an action (that doesn't return a result) in a transaction. If no current connection and/or transaction exists, it will establish it and commit and close it afterwards. An existing connection/transaction will be reused. Inside the action, the connection is available as DbConnection and the transaction as DbTransaction.
(Inherited from ControllerBase.)
Public methodDoInTransactionT(ControllerBaseActionWithResultT)
Executes an action in a transaction and returns the result. If no current connection and/or transaction exists, it will establish it and commit and close it afterwards. An existing connection/transaction will be reused. Inside the action, the connection is available as DbConnection and the transaction as DbTransaction.
(Inherited from ControllerBase.)
Public methodDoInTransactionT(FuncSqlConnection, SqlTransaction, T, Boolean)
Executes an action in a transaction and returns the result. Connection and Transaction are passed to delegate, to allow passing to other controllers If no current connection and/or transaction exists, it will establish it and commit and close it afterwards. An existing connection/transaction will be reused. Set forceNew to true to ensure new connection and transaction Inside the action, the connection is available as DbConnection and the transaction as DbTransaction.
(Inherited from ControllerBase.)
Public methodExecuteMutexOperation(String, Action, Boolean) (Inherited from ControllerBase.)
Public methodStatic memberGetCustomer
Returns the customer with the provided id. Can return null.
Public methodStatic memberGetCustomerByName
Returns the customer with the specified name or alias.
Public methodStatic memberGetCustomerId
Returns the customer id from tblCustomer based on the name. Aliases in tblCustomerAuth.Alias is also searched.
Public methodStatic memberGetCustomerName
Returns the customer name from tblCustomer in the master database.
Public methodStatic memberGetCustomers
Returns all the customers in the master database. Cached for 2 minutes
Public methodGetDatabaseFileData
Returns a data reader with database file info
Public methodStatic memberGetDistinctCustomers
Multiple customers can be configured with the same database connection, for instance when setting up an external federated sign on in combination with an internal AD SSO. Some timer services should not service both customer entries so this method returns one customer object per distinct database connection
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultIntegerList, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultAppIdentity, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultBoolean, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultIListGuid, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultListGuid, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultListInt32, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultGuid, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultInt32, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresent(String, ControllerBaseActionWithResultTimeZoneInfo, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresentT(String, ControllerBaseActionWithResultListT, ControllerBaseCacheOptions) (Inherited from ControllerBase.)
Public methodGetFromCacheIfPresentT(String, ControllerBaseActionWithResultT, ControllerBaseCacheOptions)
Retrieves some data from the cache or (if it is not there) executes an action and stores the result in the cache. Caching is not applied if the IgnoreCacheContext is used (depending on the parameter for it). Note: caching should only be used with great care as there are a number of potential issues involved in using it!
(Inherited from ControllerBase.)
Public methodGetLastLogonCSV
The method retrieves the last logon time for users. Deleted users are shown. Inactive users are shown.
Public methodStatic memberGetMasterSettings
Returns a collection of all the master settings in tblMasterSetting in the master database
Public methodStatic memberGetSingularCustomer
Returns the (singular) customer from tblCustomer. If tblCustomer contains more or less than 1 row an exception is thrown.
Public methodPerformMaintenanceActions
This method is fired up every now and then by the timer service. The implementation must be kept fast and without interfearing with the portal end user experience
Public methodStatic memberPingDatabase
This function is called as the first database function in a page view. It helps to clear invalid connections in the ADO.NET connection pool
Public methodStatic memberSaveActivityLog
Saves a ActivityLog into tblActLog.
Public methodStatic memberSaveEventLog
Public methodSaveMasterSettingAndRecordOldValue
Saves a single master setting to the database
Public methodStatic memberUpdateXmlSchemaFiles
Updates the Xml Schema dataobjects based on the xsd files on the disk.
Top
Extension Methods
  NameDescription
Public Extension MethodToBool
Converts object to boolean.
(Defined by ObjectExtensions.)
Public Extension MethodToDateTime
Converts object to DateTime.
(Defined by ObjectExtensions.)
Public Extension MethodToInt
Converts object to integer.
(Defined by ObjectExtensions.)
Top
See Also