Highway Framework
Release 1.0.1.0
The fastest and smoothest way to great architecture
|
The default implementation of a Object context for the database first approach to Entity Framework More...
Public Member Functions | |
ObjectDataContext (EntityConnection connection) | |
Creates a database or model first context /// | |
ObjectDataContext (string connectionString) | |
Creates a database or model first context | |
IQueryable< T > | AsQueryable< T > () |
This gives a mockable wrapper around the normal SetT method that allows for testablity | |
T | Add< T > (T item) |
Adds the provided instance of T to the data context | |
T | Remove< T > (T item) |
Removes the provided instance of T from the data context | |
T | Update< T > (T item) |
Updates the provided instance of T in the data context | |
T | Attach< T > (T item) |
Attaches the provided instance of T to the data context | |
T | Detach< T > (T item) |
Detaches the provided instance of T from the data context | |
T | Reload< T > (T item) |
Reloads the provided instance of T from the database | |
int | Commit () |
Commits all currently tracked entity changes | |
IEnumerable< T > | ExecuteSqlQuery< T > (string sql, params DbParameter[] dbParams) |
Executes a SQL command and tries to map the returned datasets into an IEnumerable{T} The results should have the same column names as the Entity Type has properties | |
int | ExecuteSqlCommand (string sql, params DbParameter[] dbParams) |
Executes a SQL command and returns the standard int return from the query |
Protected Member Functions | |
ObjectDataContext (string connectionString, string defaultContainerName) | |
Creates a database or model first context | |
ObjectDataContext (EntityConnection connection, string defaultContainerName) | |
Creates a database or model first context |
Properties | |
IEventManager | EventManager [get, set] |
The reference to EventManager that allows for ordered event handling and registration |
Events | |
EventHandler< PreSaveEventArgs > | PreSave |
The event fired just before the commit of the ORM | |
EventHandler< PostSaveEventArgs > | PostSave |
The event fired just after the commit of the ORM | |
Events inherited from Highway.Data.Interfaces.IObservableDataContext |
The default implementation of a Object context for the database first approach to Entity Framework
|
inline |
Creates a database or model first context ///
connection |
|
inline |
Creates a database or model first context
connectionString |
|
inlineprotected |
Creates a database or model first context
connectionString | |
defaultContainerName |
|
inlineprotected |
Creates a database or model first context
connection | |
defaultContainerName |
|
inline |
Adds the provided instance of T to the data context
T | The Entity Type being added |
item | The T you want to add |
Implements Highway.Data.Interfaces.IDataContext.
T | : | class |
|
inline |
This gives a mockable wrapper around the normal SetT method that allows for testablity
T | The Entity being queried |
Implements Highway.Data.Interfaces.IDataContext.
T | : | class |
|
inline |
Attaches the provided instance of T to the data context
T | The Entity Type being attached |
item | The T you want to attach |
Implements Highway.Data.Interfaces.IDataContext.
T | : | class |
|
inline |
Commits all currently tracked entity changes
Implements Highway.Data.Interfaces.IDataContext.
|
inline |
Detaches the provided instance of T from the data context
T | The Entity Type being detached |
item | The T you want to detach |
Implements Highway.Data.Interfaces.IDataContext.
T | : | class |
|
inline |
Executes a SQL command and returns the standard int return from the query
sql | The Sql Statement |
dbParams | A List of Database Parameters for the Query |
Implements Highway.Data.Interfaces.IDataContext.
|
inline |
Executes a SQL command and tries to map the returned datasets into an IEnumerable{T} The results should have the same column names as the Entity Type has properties
T | The Entity Type that the return should be mapped to |
sql | The Sql Statement |
dbParams | A List of Database Parameters for the Query |
Implements Highway.Data.Interfaces.IDataContext.
|
inline |
Reloads the provided instance of T from the database
T | The Entity Type being reloaded |
item | The T you want to reload |
Implements Highway.Data.Interfaces.IDataContext.
T | : | class |
|
inline |
Removes the provided instance of T from the data context
T | The Entity Type being removed |
item | The T you want to remove |
Implements Highway.Data.Interfaces.IDataContext.
T | : | class |
|
inline |
Updates the provided instance of T in the data context
T | The Entity Type being updated |
item | The T you want to update |
Implements Highway.Data.Interfaces.IDataContext.
T | : | class |
|
getset |
The reference to EventManager that allows for ordered event handling and registration
Implements Highway.Data.Interfaces.IDataContext.
EventHandler<PostSaveEventArgs> Highway.Data.ObjectDataContext.PostSave |
The event fired just after the commit of the ORM
Implements Highway.Data.Interfaces.IObservableDataContext.
EventHandler<PreSaveEventArgs> Highway.Data.ObjectDataContext.PreSave |
The event fired just before the commit of the ORM
Implements Highway.Data.Interfaces.IObservableDataContext.