Show / Hide Table of Contents

Interface IReadService<TModel, TContext, TQuery>

Payroll backend service with CRUD operations

Namespace: PayrollEngine.Client.Service
Assembly: PayrollEngine.Client.Core.dll
Syntax
public interface IReadService<in TModel, in TContext, in TQuery> where TContext : IServiceContext where TQuery : Query
Type Parameters
Name Description
TModel
TContext
TQuery

Methods

GetAsync<T>(TContext, int)

Get object

Declaration
Task<T> GetAsync<T>(TContext context, int objectId) where T : class, TModel
Parameters
Type Name Description
TContext context

The service context

int objectId

The object id

Returns
Type Description
Task<T>

The object, null if missing

Type Parameters
Name Description
T

QueryAsync<T>(TContext, TQuery)

Query objects

Declaration
Task<List<T>> QueryAsync<T>(TContext context, TQuery query = null) where T : class, TModel
Parameters
Type Name Description
TContext context

The service context

TQuery query

The query

Returns
Type Description
Task<List<T>>

List of objects

Type Parameters
Name Description
T

QueryCountAsync(TContext, TQuery)

Query count of objects

Declaration
Task<long> QueryCountAsync(TContext context, TQuery query = null)
Parameters
Type Name Description
TContext context

The service context

TQuery query

The query

Returns
Type Description
Task<long>

Count of objects

QueryResultAsync<T>(TContext, TQuery)

Query items and count of objects

Declaration
Task<QueryResult<T>> QueryResultAsync<T>(TContext context, TQuery query = null) where T : class, TModel
Parameters
Type Name Description
TContext context

The service context

TQuery query

The query

Returns
Type Description
Task<QueryResult<T>>

List and count of objects

Type Parameters
Name Description
T

Extension Methods

ConsoleExtensions.WriteProperties(object, bool)
ValueTypeExtensions.GetValueType(object)
ObjectInfo.GetPropertyValue(object, string)
ObjectInfo.GetPropertyValue<T>(object, string, T)
ObjectInfo.ResolvePropertyValue(object, string)
ObjectInfo.SetPropertyValue(object, string, object)
☀
☾
Back to top Generated by DocFX