C# Class Repository, code

Inheritance: IBoatInspectorRepository
Afficher le fichier Open project: shendongnian/code Class Usage Examples

Private Properties

Свойство Type Description
Add RepositoryInstructionResult
Get T
MethodA void
MethodB void
Update RepositoryInstructionResult

Méthodes publiques

Méthode Description
Delete ( entity ) : void

Delete an entity

Disconnect ( ISession session ) : void

Disconnect from the session. Accept parameter so we can use anywhere.

Flush ( ) : void

Method for flushing the session.

GetById ( Guid id ) : T

Retrieve an entity

Reconnect ( ISession session ) : void

Reconnect to the session. Accept parameter so we can use anywhere.

Repository ( IDatabaseSessions databaseSessions, DbConnectionSessionType connectionType = DbConnectionSessionType.PostgresqlSession )
Repository ( ISession session )
Respository ( MyDbContext db )
Save ( entity ) : void

Save an entity.

SearchExact ( string keyword, Expression getNameExpression ) : IQueryable
Update ( entity ) : void

Update an entity

Private Methods

Méthode Description
Add ( item ) : RepositoryInstructionResult
Get ( int id ) : T
MethodA ( ) : void
MethodB ( ) : void
Update ( item ) : RepositoryInstructionResult

Method Details

Delete() public méthode

Delete an entity
public Delete ( entity ) : void
Résultat void

Disconnect() public méthode

Disconnect from the session. Accept parameter so we can use anywhere.
public Disconnect ( ISession session ) : void
session ISession
Résultat void

Flush() public méthode

Method for flushing the session.
public Flush ( ) : void
Résultat void

GetById() public méthode

Retrieve an entity
public GetById ( Guid id ) : T
id Guid
Résultat T

Reconnect() public méthode

Reconnect to the session. Accept parameter so we can use anywhere.
public Reconnect ( ISession session ) : void
session ISession
Résultat void

Repository() public méthode

public Repository ( IDatabaseSessions databaseSessions, DbConnectionSessionType connectionType = DbConnectionSessionType.PostgresqlSession )
databaseSessions IDatabaseSessions
connectionType DbConnectionSessionType

Repository() public méthode

public Repository ( ISession session )
session ISession

Respository() public méthode

public Respository ( MyDbContext db )
db MyDbContext

Save() public méthode

Save an entity.
public Save ( entity ) : void
Résultat void

SearchExact() public méthode

public SearchExact ( string keyword, Expression getNameExpression ) : IQueryable
keyword string
getNameExpression Expression
Résultat IQueryable

Update() public méthode

Update an entity
public Update ( entity ) : void
Résultat void