refactor some missing imports ...
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
using System;
|
||||||
|
using GraphQL.Types;
|
||||||
using xDataService.Db;
|
using xDataService.Db;
|
||||||
using xDataService.GraphQL;
|
using xDataService.GraphQL;
|
||||||
using xDataService.Interfaces;
|
using xDataService.Interfaces;
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TDto> AddAsync(
|
public virtual async Task<TDto> AddAsync(
|
||||||
TDto item,
|
TDto item,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
@@ -155,7 +155,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TDto> AddOrUpdateAsync(
|
public virtual async Task<TDto> AddOrUpdateAsync(
|
||||||
TDto item,
|
TDto item,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
@@ -202,15 +202,12 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task AddRangeAsync(
|
public virtual async Task AddRangeAsync(
|
||||||
IEnumerable<TDto> items,
|
IEnumerable<TDto> items,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
TDto result = null;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Validate ...
|
// Validate ...
|
||||||
bool isValid =
|
bool isValid =
|
||||||
@@ -249,7 +246,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TDto> UpdateAsync(
|
public virtual async Task<TDto> UpdateAsync(
|
||||||
TKey id,
|
TKey id,
|
||||||
TDto item,
|
TDto item,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
@@ -290,7 +287,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> UpdateRangeAsync(
|
public virtual async Task<bool> UpdateRangeAsync(
|
||||||
IEnumerable<TDto> items,
|
IEnumerable<TDto> items,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
@@ -339,7 +336,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TDto> RemoveAsync(
|
public virtual async Task<TDto> RemoveAsync(
|
||||||
TKey id,
|
TKey id,
|
||||||
bool softDelete = true,
|
bool softDelete = true,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
@@ -378,7 +375,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TDto> RemoveAsync(
|
public virtual async Task<TDto> RemoveAsync(
|
||||||
TDto item,
|
TDto item,
|
||||||
bool softDelete = true,
|
bool softDelete = true,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
@@ -420,7 +417,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="saveChanges"></param>
|
/// <param name="saveChanges"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task RemoveRangeAsync(
|
public virtual async Task RemoveRangeAsync(
|
||||||
IEnumerable<TDto> items,
|
IEnumerable<TDto> items,
|
||||||
bool softDelete = true,
|
bool softDelete = true,
|
||||||
bool saveChanges = true,
|
bool saveChanges = true,
|
||||||
@@ -464,7 +461,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="ignoreSoftDeleteds"></param>
|
/// <param name="ignoreSoftDeleteds"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<int> CountAsync(
|
public virtual async Task<int> CountAsync(
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
@@ -487,7 +484,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="ignoreSoftDeleteds"></param>
|
/// <param name="ignoreSoftDeleteds"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<int> PagesCountAsync(
|
public virtual async Task<int> PagesCountAsync(
|
||||||
int pageSize,
|
int pageSize,
|
||||||
int? totalItems = null,
|
int? totalItems = null,
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
@@ -516,7 +513,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="ignoreSoftDeleteds"></param>
|
/// <param name="ignoreSoftDeleteds"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<bool> IsExistsAsync(
|
public virtual async Task<bool> IsExistsAsync(
|
||||||
TKey id,
|
TKey id,
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
@@ -544,7 +541,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="includeBuilder"></param>
|
/// <param name="includeBuilder"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TDto> GetAsync(
|
public virtual async Task<TDto> GetAsync(
|
||||||
TKey id,
|
TKey id,
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
||||||
@@ -583,7 +580,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="includeBuilder"></param>
|
/// <param name="includeBuilder"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IEnumerable<TDto>> GetAllAsync(
|
public virtual async Task<IEnumerable<TDto>> GetAllAsync(
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBuilder = null,
|
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBuilder = null,
|
||||||
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
||||||
@@ -623,7 +620,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="includeBuilder"></param>
|
/// <param name="includeBuilder"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async IAsyncEnumerable<TDto> GetAllAsAsyncEnumerable(
|
public virtual async IAsyncEnumerable<TDto> GetAllAsAsyncEnumerable(
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBuilder = null,
|
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBuilder = null,
|
||||||
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
||||||
@@ -658,7 +655,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="includeBuilder"></param>
|
/// <param name="includeBuilder"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TDto> FindOneAsync(
|
public virtual async Task<TDto> FindOneAsync(
|
||||||
Expression<Func<TEntity, bool>> predicate,
|
Expression<Func<TEntity, bool>> predicate,
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
Func<IQueryable<TEntity>, IIncludableQueryable<TEntity, object>> includeBuilder = null,
|
||||||
@@ -698,7 +695,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="includeBuilder"></param>
|
/// <param name="includeBuilder"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IEnumerable<TDto>> FindManyAsync(
|
public virtual async Task<IEnumerable<TDto>> FindManyAsync(
|
||||||
Expression<Func<TEntity, bool>> predicate,
|
Expression<Func<TEntity, bool>> predicate,
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBuilder = null,
|
Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBuilder = null,
|
||||||
@@ -741,7 +738,7 @@ namespace xDataService.Providers
|
|||||||
/// <param name="includeBuilder"></param>
|
/// <param name="includeBuilder"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<XQueryResult<TDto>> QueryAsync(
|
public virtual async Task<XQueryResult<TDto>> QueryAsync(
|
||||||
XQuery query,
|
XQuery query,
|
||||||
bool ignoreSoftDeleteds = true,
|
bool ignoreSoftDeleteds = true,
|
||||||
Expression<Func<TEntity, bool>> predicate = null,
|
Expression<Func<TEntity, bool>> predicate = null,
|
||||||
|
|||||||
Reference in New Issue
Block a user