C# Класс SIP_Agent.Model.Crud

Abstract class for all CRUD models
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
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