C# Class EFHooks.HookedDbContext

An Entity Framework DbContext that can be hooked into by registering EFHooks.IHook objects.
Inheritance: System.Data.DbContext
Datei anzeigen Open project: kmckelvin/EFHooks Class Usage Examples

Protected Properties

Property Type Description
PostHooks IList
PreHooks IList

Public Methods

Method Description
HookedDbContext ( ) : System.Collections.Generic
HookedDbContext ( IHook hooks ) : System.Collections.Generic
HookedDbContext ( IHook hooks, string nameOrConnectionString ) : System.Collections.Generic
HookedDbContext ( string nameOrConnectionString ) : System.Collections.Generic
RegisterHook ( IPostActionHook hook ) : void

Registers a hook to run after a database action occurs.

RegisterHook ( IPreActionHook hook ) : void

Registers a hook to run before a database action occurs.

SaveChanges ( ) : int

Method Details

HookedDbContext() public method

public HookedDbContext ( ) : System.Collections.Generic
return System.Collections.Generic

HookedDbContext() public method

public HookedDbContext ( IHook hooks ) : System.Collections.Generic
hooks IHook
return System.Collections.Generic

HookedDbContext() public method

public HookedDbContext ( IHook hooks, string nameOrConnectionString ) : System.Collections.Generic
hooks IHook
nameOrConnectionString string
return System.Collections.Generic

HookedDbContext() public method

public HookedDbContext ( string nameOrConnectionString ) : System.Collections.Generic
nameOrConnectionString string
return System.Collections.Generic

RegisterHook() public method

Registers a hook to run after a database action occurs.
public RegisterHook ( IPostActionHook hook ) : void
hook IPostActionHook The hook to register.
return void

RegisterHook() public method

Registers a hook to run before a database action occurs.
public RegisterHook ( IPreActionHook hook ) : void
hook IPreActionHook The hook to register.
return void

SaveChanges() public method

public SaveChanges ( ) : int
return int

Property Details

PostHooks protected_oe property

protected IList PostHooks
return IList

PreHooks protected_oe property

protected IList PreHooks
return IList