C# Класс Phun.Data.SqlContentRepository

IContentRepository implementation for SQL store.
Наследование: AContentRepository, IContentRepository
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
CachePath string
ConnectionStringName string
DataRepository ISqlDataRepository
TableName string

Открытые методы

Метод Описание
Exists ( ContentModel content ) : bool

Check for exist of content.

List ( ContentModel content ) : IQueryable

Lists the specified content.Path

Remove ( ContentModel content ) : void

Removes the specified content path or route.

Retrieve ( ContentModel content, bool includeData = true ) : ContentModel

Populate or gets the content provided specific host, path, and name property.

Save ( ContentModel content ) : void

Saves the specified content.

SqlContentRepository ( IMapRouteConfiguration config ) : System

Initializes a new instance of the SqlContentRepository class.

SqlContentRepository ( ISqlDataRepository dataRepo, string connectionStringName, string tableName, string cachePath ) : System

Initializes a new instance of the SqlContentRepository class.

Защищенные методы

Метод Описание
EnsureSchema ( ) : void

Ensures the schema.

Приватные методы

Метод Описание
Initialize ( ISqlDataRepository dataRepo, string connectionStringName, string tableName, string cachePath ) : void

Initializes the specified data repo.

Save ( ContentModel content, DapperContext db ) : void

Описание методов

EnsureSchema() защищенный Метод

Ensures the schema.
protected EnsureSchema ( ) : void
Результат void

Exists() публичный Метод

Check for exist of content.
public Exists ( ContentModel content ) : bool
content ContentModel The content - requires host, path, and name property.
Результат bool

List() публичный Метод

Lists the specified content.Path
public List ( ContentModel content ) : IQueryable
content ContentModel The content.
Результат IQueryable

Remove() публичный Метод

Removes the specified content path or route.
public Remove ( ContentModel content ) : void
content ContentModel The content - requires host, path, and name property. If name is set to "*" then removes all for host and path.
Результат void

Retrieve() публичный Метод

Populate or gets the content provided specific host, path, and name property.
public Retrieve ( ContentModel content, bool includeData = true ) : ContentModel
content ContentModel The content - requires host, path, and name property.
includeData bool if set to true [include data].
Результат ContentModel

Save() публичный Метод

Saves the specified content.
public Save ( ContentModel content ) : void
content ContentModel The content - requires host, path, and name property.
Результат void

SqlContentRepository() публичный Метод

Initializes a new instance of the SqlContentRepository class.
public SqlContentRepository ( IMapRouteConfiguration config ) : System
config IMapRouteConfiguration The config.
Результат System

SqlContentRepository() публичный Метод

Initializes a new instance of the SqlContentRepository class.
Connection does not exist.
public SqlContentRepository ( ISqlDataRepository dataRepo, string connectionStringName, string tableName, string cachePath ) : System
dataRepo ISqlDataRepository The data repo.
connectionStringName string Name of the connection string.
tableName string Name of the table.
cachePath string The cache path.
Результат System

Описание свойств

CachePath защищенное свойство

The cache path
protected string CachePath
Результат string

ConnectionStringName защищенное свойство

The connection string name
protected string ConnectionStringName
Результат string

DataRepository защищенное свойство

The data repository
protected ISqlDataRepository DataRepository
Результат ISqlDataRepository

TableName защищенное свойство

The table name
protected string TableName
Результат string