Class SQLWrapperExecuter<T>
Used for executing a sql wrapper and enumerating the results using the specified complex, or entity, type T
The property names on the type must match the names of the columns you want returned from the sql wrapper schema defined by Name
Inheritance
Inherited Members
Namespace: LemonEdge.API.Entities.Helpers
Assembly: API.dll
Syntax
public class SQLWrapperExecuter<T> : BaseSQLWrapperExecuter<SQLWrapperExecuter<T>, T>
Type Parameters
Name | Description |
---|---|
T | The complex or entity type that can hold the results of executing the sql wrapper |
Constructors
SQLWrapperExecuter(ISQLWrapper, IEntityRetriever, IReadOnlyCache)
Creates a new SQLWrapperExecuter for the specified sql wrapper
Declaration
public SQLWrapperExecuter(ISQLWrapper sqlWrapper, IEntityRetriever retriever, IReadOnlyCache cache)
Parameters
Type | Name | Description |
---|---|---|
ISQLWrapper | sqlWrapper | The sql wrapper to execute |
IEntityRetriever | retriever | A context to execute the sql wrapper with |
IReadOnlyCache | cache | A local cache |
SQLWrapperExecuter(Guid, IEntityRetriever, IReadOnlyCache)
Creates a new SQLWrapperExecuter for the specified sql wrapper
Declaration
public SQLWrapperExecuter(Guid sqlWrapperID, IEntityRetriever retriever, IReadOnlyCache cache)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | sqlWrapperID | The unique global id of the sql wrapper to execute - must match exactly |
IEntityRetriever | retriever | A context to execute the sql wrapper with |
IReadOnlyCache | cache | A local cache |
SQLWrapperExecuter(String, IEntityRetriever, IReadOnlyCache)
Creates a new SQLWrapperExecuter for the specified sql wrapper
Declaration
public SQLWrapperExecuter(string sqlWrapperName, IEntityRetriever retriever, IReadOnlyCache cache)
Parameters
Type | Name | Description |
---|---|---|
System.String | sqlWrapperName | The name of the sql wrapper to execute - must match exactly |
IEntityRetriever | retriever | A context to execute the sql wrapper with |
IReadOnlyCache | cache | A local cache |
Methods
Execute()
Executes the sql wrapper with the specified parameters and filters. Returns the results as an enumeration of type T
Declaration
public override Task<IEnumerable<T>> Execute()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<T>> | The results of exeucting the sql wrapper as an enumeration of type |
Overrides
ExecuteCount()
Executes the sql wrapper with the specified parameters and filters. Returns the total count of the results
Declaration
public override Task<int> ExecuteCount()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | The count of the results of exeucting the sql wrapper |