C# 클래스 Rock.Data.DbContext

Entity Framework Context
상속: System.Data.Entity.DbContext
파일 보기 프로젝트 열기: SparkDevNetwork/Rock 1 사용 예제들

공개 메소드들

메소드 설명
DbContext ( ) : System

Initializes a new instance of the DbContext class.

DbContext ( string nameOrConnectionString ) : System

Initializes a new instance of the DbContext class.

SaveChanges ( ) : int

Saves all changes made in this context to the underlying database.

SaveChanges ( bool disablePrePostProcessing ) : int

Saves all changes made in this context to the underlying database. The default pre and post processing can also optionally be disabled. This would disable audit records being created, workflows being triggered, and any PreSaveChanges() methods being called for changed entities.

WrapTransaction ( System.Action action ) : void

Wraps code in a BeginTransaction and CommitTransaction

보호된 메소드들

메소드 설명
RockPostSave ( List updatedItems, PersonAlias personAlias, bool enableAuditing = false ) : void

Creates audit logs and/or triggers workflows for items that were changed

RockPreSave ( DbContext dbContext, PersonAlias personAlias, bool enableAuditing = false ) : List

Updates the Created/Modified data for any model being created or modified

비공개 메소드들

메소드 설명
AuditClass ( Type baseType ) : bool
AuditProperty ( PropertyInfo propertyInfo ) : bool
GetAuditDetails ( DbContext dbContext, ContextItem item, int personAliasId ) : void
IsQualifierMatch ( ContextItem item, PropertyInfo>.Dictionary properties, WorkflowTrigger trigger ) : bool

Determines whether the entity matches the current and/or previous qualifier values. If

TriggerWorkflows ( ContextItem item, WorkflowTriggerType triggerType, PersonAlias personAlias ) : bool

Triggers all the workflows of the given triggerType for the given entity item.

메소드 상세

DbContext() 공개 메소드

Initializes a new instance of the DbContext class.
public DbContext ( ) : System
리턴 System

DbContext() 공개 메소드

Initializes a new instance of the DbContext class.
public DbContext ( string nameOrConnectionString ) : System
nameOrConnectionString string Either the database name or a connection string.
리턴 System

RockPostSave() 보호된 메소드

Creates audit logs and/or triggers workflows for items that were changed
protected RockPostSave ( List updatedItems, PersonAlias personAlias, bool enableAuditing = false ) : void
updatedItems List The updated items.
personAlias PersonAlias The person alias.
enableAuditing bool if set to true [enable auditing].
리턴 void

RockPreSave() 보호된 메소드

Updates the Created/Modified data for any model being created or modified
protected RockPreSave ( DbContext dbContext, PersonAlias personAlias, bool enableAuditing = false ) : List
dbContext DbContext The database context.
personAlias PersonAlias The person alias.
enableAuditing bool if set to true [enable auditing].
리턴 List

SaveChanges() 공개 메소드

Saves all changes made in this context to the underlying database.
public SaveChanges ( ) : int
리턴 int

SaveChanges() 공개 메소드

Saves all changes made in this context to the underlying database. The default pre and post processing can also optionally be disabled. This would disable audit records being created, workflows being triggered, and any PreSaveChanges() methods being called for changed entities.
public SaveChanges ( bool disablePrePostProcessing ) : int
disablePrePostProcessing bool if set to true disables /// the Pre and Post processing from being run. This should only be disabled /// when updating a large number of records at a time (e.g. importing records).
리턴 int

WrapTransaction() 공개 메소드

Wraps code in a BeginTransaction and CommitTransaction
public WrapTransaction ( System.Action action ) : void
action System.Action The action.
리턴 void