Version

Fetch Method (WebScheduleDbProvider)

Fetches WebSchedule objects from the data model using the configured data bindings and underlying data store technology.
Syntax
'Declaration
 
Public Overridable Sub Fetch( _
   ByVal context As DataContext _
) 
public virtual void Fetch( 
   DataContext context
)

Parameters

context
A DataContext describing the data bindings and operation to be performed.
Exceptions
ExceptionDescription
System.ArgumentExceptionThrown when context does not specify a supported operation. A valid Operation must be one of "FetchResource", "FetchResources", "FetchActivities" or "FetchReminders".
System.ArgumentNullExceptionThrown when the supplied context is null (Nothing in Visual Basic .NET).
Remarks

This method implements the Fetch method of the IDataFetch interface. The WebScheduleInfo consumes this interface in order to populate it's collections with Activities and Resources from the WebSchedule data model at data-bind time. Web application developers should not call this method directly from their scheduling applications.

The base class implementation of Fetch handles the following operations:

  1. Retrieves activities over a frame interval (date range) for an organizing resource.
  2. Retrieves activities for which a reminder should be triggered (based on the reminder lead-time) for their organizing resource when logged on.
  3. Retrieves a singular resource that is the active organizer of activities.
  4. Retrieves resources who can organize and own activities.

Inheritors developing their own custom data provider should override Fetch to support additional operations, current operations on different relational database management systems, and data bindings (e.g., to increase the number of types the WebSchedule data model can persist from a scheduling application). Please see the help documentation for further information on extending WebScheduleDbProvider to create a custom data provider.

When extending the WebScheduleDbProvider (additional operations or data bindings), inheritors should first check context to see if it matches one of their extended DataContexts. When it does, the subclass is responsible for dispatching it to a method it implements for handling that operation and/or ScheduleDataBinding subclass. If the context does not match a recognized operation, then call the base implementation of Fetch to ensure proper dispatch and/or error handling.

When implementing support for a new relational database management system (or other underlying data store), the implementation of methods for standard operations (i.e., "FetchActivities", "AddActivity", etc.) MAY not be compatible with that data technology. When this is the case, the overridden implementation of Fetch in the subclass should handle the standard operation and dispatch it to it's own method supporting the new data platform.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also