C# 클래스 JPB.DataAccess.Manager.DbAccessLayer

파일 보기 프로젝트 열기: JPVenson/DataAccess 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DbAccessLayer System
DbAccessLayer System
EnumerateDataRecords IEnumerable
EnumerateDataRecords List
EnumerateDirectDataRecords IEnumerable
EnumerateMarsDataRecords List>
GenerateStrategy IDatabaseStrategy
RaiseDelete void
RaiseInsert void
RaiseSelect void
RaiseUpdate void
ReflectionPropertySet object
ResolveDbType void

공개 메소드들

메소드 설명
CheckDatabase ( ) : bool

Check for Availability

CreateInstance ( DbClassInfoCache classInfo, IDataRecord reader, bool &fullLoaded, DbAccessType accessType = null ) : object

Creates an instance based on a Ctor injection or Reflection loading or when using a MsCoreLib type direct enumeration

DbAccessLayer ( DbAccessType dbAccessType, string connection, ILogger logger = null, System.Data.DbConfig config = null ) : System

Create a DbAccessLayer that uses a Predefined type and Connection string

DbAccessLayer ( IDatabase database, ILogger logger = null, System.Data.DbConfig config = null ) : System

Creates a DbAccessLayer with a new Database dbAccessType will be Guessed

DbAccessLayer ( IDatabaseStrategy database, ILogger logger = null, System.Data.DbConfig config = null ) : System

Create a DbAccessLayer with a new Database

DbAccessLayer ( string fullTypeNameToIDatabaseStrategy, string connection, ILogger logger = null, System.Data.DbConfig config = null ) : System

Create a DbAccessLAyer with exernal Strategy

ExecuteGenericCommand ( IDbCommand command ) : int

Execute a QueryCommand without Paramters

ExecuteGenericCommand ( string query, IEnumerable values ) : int

Wraps a QueryCommand and its Paramters and then executes it

ExecuteGenericCommand ( string query, dynamic paramenter ) : int

Wraps a QueryCommand and its Paramters from Dynamic and then executes it

GetClassInfo ( Type type ) : DbClassInfoCache
Query ( ) : RootQuery

Creates a Strong typed query that awaits no Result

SetPropertysViaReflection ( DbClassInfoCache type, IDataRecord reader ) : object

Creates a new Instance based on possible Ctor's and the given reader

SetPropertysViaReflection ( DbClassInfoCache type, IDataRecord reader, DbAccessType accessType ) : object

Creates a new Instance based on possible Ctor's and the given reader

SetPropertysViaReflection ( DbClassInfoCache type, IDataRecord reader, DbPropertyInfoCache>.Dictionary mapping ) : object

Creates a new Instance based on possible Ctor's and the given reader

TryValidateEntity ( object instance ) : ICollection>.Tuple

Validates a Entity

ValidateEntity ( object instance ) : void

Validates a Entity

ValidateEntityPk ( object instance ) : void

Validates a Entity

비공개 메소드들

메소드 설명
DbAccessLayer ( ) : System
DbAccessLayer ( ILogger logger = null, System.Data.DbConfig config = null ) : System
EnumerateDataRecords ( IDbCommand query, bool direct, DbClassInfoCache type ) : IEnumerable
EnumerateDataRecords ( IDbCommand query ) : List
EnumerateDirectDataRecords ( IDbCommand query, DbClassInfoCache info ) : IEnumerable
EnumerateMarsDataRecords ( IDbCommand query ) : List>
GenerateStrategy ( string fullValidIdentifyer, string connection ) : IDatabaseStrategy
RaiseDelete ( object sender, IDbCommand query ) : void
RaiseInsert ( object sender, IDbCommand query ) : void
RaiseSelect ( IDbCommand query ) : void
RaiseUpdate ( object sender, IDbCommand query ) : void
ReflectionPropertySet ( System.Data.DbConfig config, object instance, DbClassInfoCache info, IDataRecord reader, DbPropertyInfoCache>.Dictionary cache, DbAccessType dbAccessType ) : object
ResolveDbType ( string fullTypeNameToIDatabaseStrategy ) : void

메소드 상세

CheckDatabase() 공개 메소드

Check for Availability
public CheckDatabase ( ) : bool
리턴 bool

CreateInstance() 공개 정적인 메소드

Creates an instance based on a Ctor injection or Reflection loading or when using a MsCoreLib type direct enumeration
public static CreateInstance ( DbClassInfoCache classInfo, IDataRecord reader, bool &fullLoaded, DbAccessType accessType = null ) : object
classInfo DbClassInfoCache
reader IDataRecord
fullLoaded bool
accessType DbAccessType
리턴 object

DbAccessLayer() 공개 메소드

Create a DbAccessLayer that uses a Predefined type and Connection string
public DbAccessLayer ( DbAccessType dbAccessType, string connection, ILogger logger = null, System.Data.DbConfig config = null ) : System
dbAccessType DbAccessType
connection string
logger ILogger
config System.Data.DbConfig
리턴 System

DbAccessLayer() 공개 메소드

Creates a DbAccessLayer with a new Database dbAccessType will be Guessed
public DbAccessLayer ( IDatabase database, ILogger logger = null, System.Data.DbConfig config = null ) : System
database IDatabase
logger ILogger
config System.Data.DbConfig
리턴 System

DbAccessLayer() 공개 메소드

Create a DbAccessLayer with a new Database
public DbAccessLayer ( IDatabaseStrategy database, ILogger logger = null, System.Data.DbConfig config = null ) : System
database IDatabaseStrategy
logger ILogger
config System.Data.DbConfig
리턴 System

DbAccessLayer() 공개 메소드

Create a DbAccessLAyer with exernal Strategy
public DbAccessLayer ( string fullTypeNameToIDatabaseStrategy, string connection, ILogger logger = null, System.Data.DbConfig config = null ) : System
fullTypeNameToIDatabaseStrategy string
connection string
logger ILogger
config System.Data.DbConfig
리턴 System

ExecuteGenericCommand() 공개 메소드

Execute a QueryCommand without Paramters
public ExecuteGenericCommand ( IDbCommand command ) : int
command IDbCommand
리턴 int

ExecuteGenericCommand() 공개 메소드

Wraps a QueryCommand and its Paramters and then executes it
public ExecuteGenericCommand ( string query, IEnumerable values ) : int
query string
values IEnumerable
리턴 int

ExecuteGenericCommand() 공개 메소드

Wraps a QueryCommand and its Paramters from Dynamic and then executes it
public ExecuteGenericCommand ( string query, dynamic paramenter ) : int
query string
paramenter dynamic
리턴 int

GetClassInfo() 공개 메소드

public GetClassInfo ( Type type ) : DbClassInfoCache
type System.Type
리턴 DbClassInfoCache

Query() 공개 메소드

Creates a Strong typed query that awaits no Result
public Query ( ) : RootQuery
리턴 RootQuery

SetPropertysViaReflection() 공개 메소드

Creates a new Instance based on possible Ctor's and the given reader
public SetPropertysViaReflection ( DbClassInfoCache type, IDataRecord reader ) : object
type DbClassInfoCache
reader IDataRecord
리턴 object

SetPropertysViaReflection() 공개 메소드

Creates a new Instance based on possible Ctor's and the given reader
public SetPropertysViaReflection ( DbClassInfoCache type, IDataRecord reader, DbAccessType accessType ) : object
type DbClassInfoCache
reader IDataRecord
accessType DbAccessType
리턴 object

SetPropertysViaReflection() 공개 메소드

Creates a new Instance based on possible Ctor's and the given reader
public SetPropertysViaReflection ( DbClassInfoCache type, IDataRecord reader, DbPropertyInfoCache>.Dictionary mapping ) : object
type DbClassInfoCache
reader IDataRecord
mapping DbPropertyInfoCache>.Dictionary
리턴 object

TryValidateEntity() 공개 메소드

Validates a Entity
public TryValidateEntity ( object instance ) : ICollection>.Tuple
instance object
리턴 ICollection>.Tuple

ValidateEntity() 공개 메소드

Validates a Entity
public ValidateEntity ( object instance ) : void
instance object
리턴 void

ValidateEntityPk() 공개 메소드

Validates a Entity
public ValidateEntityPk ( object instance ) : void
instance object
리턴 void