C# Class BeiDream.Data.Ef.DbContextBase

Inheritance: DbContext
显示文件 Open project: BeiMeng/BeiDream

Public Methods

Method Description
DbContextBase ( string dbName ) : System
DisableFilters ( ) : IDisposable
SaveChanges ( ) : int

保存更改

Protected Methods

Method Description
InterceptAddedOperation ( DbEntityEntry entry ) : void

拦截添加操作

InterceptDeletedOperation ( DbEntityEntry entry ) : void

拦截删除操作

InterceptModifiedOperation ( DbEntityEntry entry ) : void

拦截修改操作

OnModelCreating ( DbModelBuilder modelBuilder ) : void
SaveChangesAfter ( int result ) : int

保存更改后操作

SaveChangesBefore ( ) : void

保存更改前操作

Private Methods

Method Description
EnableFilters ( ) : IDisposable
GetApplicationSession ( ) : IApplicationSession

获取应用程序上下文

InitCreationAudited ( DbEntityEntry entry ) : void

初始化创建审计信息

InitModificationAudited ( DbEntityEntry entry ) : void

初始化修改审计信息

WriteLog ( ) : void

写日志

Method Details

DbContextBase() public method

public DbContextBase ( string dbName ) : System
dbName string
return System

DisableFilters() public method

public DisableFilters ( ) : IDisposable
return IDisposable

InterceptAddedOperation() protected method

拦截添加操作
protected InterceptAddedOperation ( DbEntityEntry entry ) : void
entry DbEntityEntry
return void

InterceptDeletedOperation() protected method

拦截删除操作
protected InterceptDeletedOperation ( DbEntityEntry entry ) : void
entry DbEntityEntry
return void

InterceptModifiedOperation() protected method

拦截修改操作
protected InterceptModifiedOperation ( DbEntityEntry entry ) : void
entry DbEntityEntry
return void

OnModelCreating() protected method

protected OnModelCreating ( DbModelBuilder modelBuilder ) : void
modelBuilder DbModelBuilder
return void

SaveChanges() public final method

保存更改
public final SaveChanges ( ) : int
return int

SaveChangesAfter() protected method

保存更改后操作
protected SaveChangesAfter ( int result ) : int
result int 影响的行数
return int

SaveChangesBefore() protected method

保存更改前操作
protected SaveChangesBefore ( ) : void
return void