C# 클래스 SIP_Agent.Model.Crud

Abstract class for all CRUD models
파일 보기 프로젝트 열기: anroots/SIP-Agent

보호된 프로퍼티들

프로퍼티 타입 설명
CurrentConnection DatabaseDataContext

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Crud ( ) : System

Default constructor - create a new DatabaseDataContext

FindAll ( int Limit ) : IQueryable

Find all non-deleted rows

Load ( int Id ) : bool

Load the model with the specified ID

Loaded ( ) : bool

Check if the model is loaded

New ( ) : int

Create a new row

Save ( ) : int

Save the currently loaded model

Unload ( ) : void

Unload the model

보호된 메소드들

메소드 설명
ResetConnection ( ) : void

Reset the DB connection

메소드 상세

Crud() 공개 메소드

Default constructor - create a new DatabaseDataContext
public Crud ( ) : System
리턴 System

FindAll() 공개 메소드

Find all non-deleted rows
public FindAll ( int Limit ) : IQueryable
Limit int Max number of rows to return
리턴 IQueryable

Load() 공개 메소드

Load the model with the specified ID
public Load ( int Id ) : bool
Id int The ID of the row in the database
리턴 bool

Loaded() 공개 메소드

Check if the model is loaded
public Loaded ( ) : bool
리턴 bool

New() 공개 메소드

Create a new row
public New ( ) : int
리턴 int

ResetConnection() 보호된 메소드

Reset the DB connection
protected ResetConnection ( ) : void
리턴 void

Save() 공개 메소드

Save the currently loaded model
public Save ( ) : int
리턴 int

Unload() 공개 메소드

Unload the model
public Unload ( ) : void
리턴 void

프로퍼티 상세

CurrentConnection 보호되어 있는 프로퍼티

Stores the current database connection. In order for SubmitChanges to work the connection must stay open. The connection can be released by the Unload method.
protected DatabaseDataContext CurrentConnection
리턴 DatabaseDataContext