C# Class Phun.Data.SqlContentRepository

IContentRepository implementation for SQL store.
Inheritance: AContentRepository, IContentRepository
Afficher le fichier Open project: noogen/phuncms Class Usage Examples

Protected Properties

Свойство Type Description
CachePath string
ConnectionStringName string
DataRepository ISqlDataRepository
TableName string

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
EnsureSchema ( ) : void

Ensures the schema.

Private Methods

Méthode Description
Initialize ( ISqlDataRepository dataRepo, string connectionStringName, string tableName, string cachePath ) : void

Initializes the specified data repo.

Save ( ContentModel content, DapperContext db ) : void

Method Details

EnsureSchema() protected méthode

Ensures the schema.
protected EnsureSchema ( ) : void
Résultat void

Exists() public méthode

Check for exist of content.
public Exists ( ContentModel content ) : bool
content ContentModel The content - requires host, path, and name property.
Résultat bool

List() public méthode

Lists the specified content.Path
public List ( ContentModel content ) : IQueryable
content ContentModel The content.
Résultat IQueryable

Remove() public méthode

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.
Résultat void

Retrieve() public méthode

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].
Résultat ContentModel

Save() public méthode

Saves the specified content.
public Save ( ContentModel content ) : void
content ContentModel The content - requires host, path, and name property.
Résultat void

SqlContentRepository() public méthode

Initializes a new instance of the SqlContentRepository class.
public SqlContentRepository ( IMapRouteConfiguration config ) : System
config IMapRouteConfiguration The config.
Résultat System

SqlContentRepository() public méthode

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.
Résultat System

Property Details

CachePath protected_oe property

The cache path
protected string CachePath
Résultat string

ConnectionStringName protected_oe property

The connection string name
protected string ConnectionStringName
Résultat string

DataRepository protected_oe property

The data repository
protected ISqlDataRepository DataRepository
Résultat ISqlDataRepository

TableName protected_oe property

The table name
protected string TableName
Résultat string