KREDOR Business Object Framework Documentation

DataSource Class

Represents a data source to which business objects are bound.

For a list of all members of this type, see DataSource Members.

System.Object
   DataSource

public class DataSource

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Usually many business classes share the same datasource and therefore it is a good idea to have them derive from an intermediary base class that encapsulates the datasource parameters. See the example in BusinessObject.

Example

// Creates a new instance of DataSource using a connection string.
DataSource ds = new DataSource("Database=MyDatabase;Server=MyServer;integrated security=SSPI;persist security info=False;Trusted_Connection=Yes");

// Creates a new instance of DataSource using the name of a key in Web.config or App.config holding a connection string.
DataSource ds = new DataSource("MyDatabase");

Requirements

Namespace: Kredor.BO

Assembly: KREDOR.BOFramework (in KREDOR.BOFramework.dll)

See Also

DataSource Members | Kredor.BO Namespace | BusinessObject