getting documentations ready.
This commit is contained in:
parent
4e00431b89
commit
9ee1286e82
@ -21,7 +21,7 @@ namespace PoweredSoft.DynamicQuery.Core
|
|||||||
{
|
{
|
||||||
string GroupPath { get; set; }
|
string GroupPath { get; set; }
|
||||||
object GroupValue { get; set; }
|
object GroupValue { get; set; }
|
||||||
bool HasSubGroups { get; set; }
|
bool HasSubGroups { get; }
|
||||||
List<IGroupQueryResult<TRecord>> SubGroups { get; set; }
|
List<IGroupQueryResult<TRecord>> SubGroups { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
30
README.md
30
README.md
@ -45,7 +45,7 @@ public class Startup
|
|||||||
```csharp
|
```csharp
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IQueryExecutionResult Get(
|
public IQueryExecutionResult<OfSomething> Get(
|
||||||
[FromServices]YourContext context,
|
[FromServices]YourContext context,
|
||||||
[FromServices]IQueryHandler handler,
|
[FromServices]IQueryHandler handler,
|
||||||
[FromServices]IQueryCriteria criteria,
|
[FromServices]IQueryCriteria criteria,
|
||||||
@ -60,7 +60,7 @@ public IQueryExecutionResult Get(
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public IQueryExecutionResult Read(
|
public IQueryExecutionResult<OfSomething> Read(
|
||||||
[FromServices]YourContext context,
|
[FromServices]YourContext context,
|
||||||
[FromServices]IQueryHandler handler,
|
[FromServices]IQueryHandler handler,
|
||||||
[FromBody]IQueryCriteria criteria)
|
[FromBody]IQueryCriteria criteria)
|
||||||
@ -75,7 +75,7 @@ public IQueryExecutionResult Read(
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IQueryExecutionResult> Read(
|
public async Task<IQueryExecutionResult<OfSomething>> Read(
|
||||||
[FromServices]YourContext context,
|
[FromServices]YourContext context,
|
||||||
[FromServices]IQueryHandlerAsync handler,
|
[FromServices]IQueryHandlerAsync handler,
|
||||||
[FromBody]IQueryCriteria criteria)
|
[FromBody]IQueryCriteria criteria)
|
||||||
@ -138,13 +138,15 @@ var criteria = new QueryCriteria
|
|||||||
};
|
};
|
||||||
|
|
||||||
var queryHandler = new QueryHandler();
|
var queryHandler = new QueryHandler();
|
||||||
IQueryExecutionResult result = queryHandler.Execute(someQueryable, criteria);
|
IQueryExecutionResult<OfSomeQueryableType> result = queryHandler.Execute(someQueryable, criteria);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Query Result
|
## Query Result
|
||||||
|
|
||||||
Here is the interfaces that represent the result of query handling execution.
|
Here is the interfaces that represent the result of query handling execution.
|
||||||
|
|
||||||
|
> Changed in 2.x
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
public interface IAggregateResult
|
public interface IAggregateResult
|
||||||
{
|
{
|
||||||
@ -153,23 +155,35 @@ public interface IAggregateResult
|
|||||||
object Value { get; set; }
|
object Value { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IQueryResult
|
public interface IQueryResult<TRecord>
|
||||||
{
|
{
|
||||||
List<IAggregateResult> Aggregates { get; }
|
List<IAggregateResult> Aggregates { get; }
|
||||||
List<object> Data { get; }
|
List<TRecord> Data { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IGroupQueryResult : IQueryResult
|
public interface IGroupQueryResult<TRecord> : IQueryResult<TRecord>
|
||||||
{
|
{
|
||||||
string GroupPath { get; set; }
|
string GroupPath { get; set; }
|
||||||
object GroupValue { get; set; }
|
object GroupValue { get; set; }
|
||||||
|
bool HasSubGroups { get; }
|
||||||
|
List<IGroupQueryResult<TRecord>> SubGroups { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IQueryExecutionResult : IQueryResult
|
public interface IQueryExecutionResultPaging
|
||||||
{
|
{
|
||||||
long TotalRecords { get; set; }
|
long TotalRecords { get; set; }
|
||||||
long? NumberOfPages { get; set; }
|
long? NumberOfPages { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface IQueryExecutionResult<TRecord> : IQueryResult<TRecord>, IQueryExecutionResultPaging
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IQueryExecutionGroupResult<TRecord> : IQueryExecutionResult<TRecord>
|
||||||
|
{
|
||||||
|
List<IGroupQueryResult<TRecord>> Groups { get; set; }
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user