Class JsonRepository<T>
Provides repository for storing data in files with Json format.
warning
This repository type is not suitable for large data collections.
Use this repository for settings, recipes or data persistence with limited number of records.
Inheritance
System.Object
JsonRepository<T>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: TcOpen.Inxton.Data.Json.dll
Syntax
public class JsonRepository<T> : RepositoryBase<T>, IRepository<T>, IRepository where T : IBrowsableDataObject
Type Parameters
| Name |
Description |
| T |
POCO twin type
|
Constructors
|
Improve this Doc
View Source
JsonRepository(JsonRepositorySettings<T>)
Declaration
public JsonRepository(JsonRepositorySettings<T> parameters)
Parameters
Properties
|
Improve this Doc
View Source
CountNvi
Declaration
protected override long CountNvi { get; }
Property Value
| Type |
Description |
| System.Int64 |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.CountNvi
|
Improve this Doc
View Source
Location
Get the location (directory) where the entries of this repository are placed.
Declaration
public string Location { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Queryable
Declaration
public override IQueryable<T> Queryable { get; }
Property Value
| Type |
Description |
| System.Linq.IQueryable<T> |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.Queryable
Methods
|
Improve this Doc
View Source
CreateNvi(String, T)
Declaration
protected override void CreateNvi(string identifier, T data)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
| T |
data |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.CreateNvi(System.String, T)
|
Improve this Doc
View Source
DeleteNvi(String)
Declaration
protected override void DeleteNvi(string identifier)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.DeleteNvi(System.String)
|
Improve this Doc
View Source
ExistsNvi(String)
Declaration
protected override bool ExistsNvi(string identifier)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.ExistsNvi(System.String)
|
Improve this Doc
View Source
FilteredCountNvi(String, eSearchMode)
Declaration
protected override long FilteredCountNvi(string id, eSearchMode searchMode)
Parameters
| Type |
Name |
Description |
| System.String |
id |
|
| eSearchMode |
searchMode |
|
Returns
| Type |
Description |
| System.Int64 |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.FilteredCountNvi(System.String, TcOpen.Inxton.Data.eSearchMode)
|
Improve this Doc
View Source
GetRecordsNvi(String, Int32, Int32, eSearchMode)
Declaration
protected override IEnumerable<T> GetRecordsNvi(string identifier, int limit, int skip, eSearchMode searchMode)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
| System.Int32 |
limit |
|
| System.Int32 |
skip |
|
| eSearchMode |
searchMode |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<T> |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.GetRecordsNvi(System.String, System.Int32, System.Int32, TcOpen.Inxton.Data.eSearchMode)
|
Improve this Doc
View Source
Load(String, Type)
Declaration
T Load(string identifier, Type objtype)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
| System.Type |
objtype |
|
Returns
|
Improve this Doc
View Source
MakeValidFileName(String)
Declaration
string MakeValidFileName(string fileName)
Parameters
| Type |
Name |
Description |
| System.String |
fileName |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
ReadNvi(String)
Declaration
protected override T ReadNvi(string identifier)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
Returns
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.ReadNvi(System.String)
|
Improve this Doc
View Source
RecordExists(String)
Declaration
bool RecordExists(string identifier)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Save(String, T)
Declaration
void Save(string identifier, T obj)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
| T |
obj |
|
|
Improve this Doc
View Source
UpdateNvi(String, T)
Declaration
protected override void UpdateNvi(string identifier, T data)
Parameters
| Type |
Name |
Description |
| System.String |
identifier |
|
| T |
data |
|
Overrides
TcOpen.Inxton.Data.RepositoryBase<T>.UpdateNvi(System.String, T)
Implements