apply sorting ...
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using MySql.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
namespace xDataService.Extensions {
|
||||
public static class DbContextOptionExtensions {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using xCommons.Extensions;
|
||||
using xModels.Base;
|
||||
using xCommons.Extensions;
|
||||
using System.Linq.Expressions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xDataService.Extensions {
|
||||
public static class EntityExtensions {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using xCommons.Extensions;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.Constants;
|
||||
using xExceptions.Constants;
|
||||
using xModels.Base;
|
||||
using xModels.Dtos;
|
||||
using System.Reflection;
|
||||
using xCommons.Extensions;
|
||||
using xExceptions.Constants;
|
||||
using System.Threading.Tasks;
|
||||
using xDataService.Constants;
|
||||
using System.Linq.Expressions;
|
||||
using System.Collections.Generic;
|
||||
using xDataService.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace xDataService.Extensions
|
||||
{
|
||||
@@ -22,6 +22,7 @@ namespace xDataService.Extensions
|
||||
/// <param name="source"></param>
|
||||
/// <param name="filter"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static IQueryable<T> ApplyFilter<T, TKey>(
|
||||
this IQueryable<T> source,
|
||||
@@ -40,6 +41,7 @@ namespace xDataService.Extensions
|
||||
/// <param name="source"></param>
|
||||
/// <param name="filter"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static async Task<IQueryable<T>> ApplyFilterAsync<T, TKey>(
|
||||
this IQueryable<T> source,
|
||||
@@ -84,6 +86,7 @@ namespace xDataService.Extensions
|
||||
/// <param name="source"></param>
|
||||
/// <param name="filter"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static async Task<IEnumerable<T>> ApplyFilterAsync<T, TKey>(
|
||||
this IEnumerable<T> source,
|
||||
@@ -319,6 +322,7 @@ namespace xDataService.Extensions
|
||||
/// <param name="isAscending"></param>
|
||||
/// <param name="columnsMap"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static IQueryable<T> ApplySorting<T, TKey>(
|
||||
this IQueryable<T> source,
|
||||
@@ -372,6 +376,7 @@ namespace xDataService.Extensions
|
||||
/// <param name="isAscending"></param>
|
||||
/// <param name="columnsMap"></param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<T> ApplySorting<T, TKey>(
|
||||
this IEnumerable<T> source,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Linq;
|
||||
using xCommons.Extensions;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.Constants;
|
||||
using xDataService.Configuration;
|
||||
|
||||
namespace xDataService.Extensions {
|
||||
public static class XDataServiceConfigurationExtensions {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using xCommons.Extensions;
|
||||
using xDataService.Constants;
|
||||
using xDataService.Models;
|
||||
using xDataService.Constants;
|
||||
|
||||
namespace xDataService.Extensions
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using GraphQL;
|
||||
using xModels.Dtos;
|
||||
using GraphQL.Types;
|
||||
using xDataService.Constants;
|
||||
using xModels.Dtos;
|
||||
|
||||
namespace xDataService.Extensions {
|
||||
public static class XGraphQLExtensions {
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Driver;
|
||||
using MongoDB.Driver.Core.Bindings;
|
||||
using MongoDB.Driver.Core.Clusters;
|
||||
using MongoDB.Driver.Core.Servers;
|
||||
using MongoDB.Driver.Core.WireProtocol.Messages.Encoders;
|
||||
using MongoDB.Driver.Linq;
|
||||
using xDataService.Mongo;
|
||||
using MongoDB.Driver.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xDataService.Extensions {
|
||||
public static class XMongoDbExtensions {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using xCommons.Extensions;
|
||||
using xDataService.Models;
|
||||
using System.ComponentModel;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xDataService.Extensions
|
||||
{
|
||||
public static class XReferenceExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts an XReference<T> to String Representation ...
|
||||
/// Converts an XReference to String Representation ...
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
@@ -42,7 +42,7 @@ namespace xDataService.Extensions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parse an String and Extract to XReference<T> if it's Described ...
|
||||
/// Parse an String and Extract to XReference if it's Described ...
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
@@ -75,9 +75,10 @@ namespace xDataService.Extensions
|
||||
try
|
||||
{
|
||||
referencedTo = (T)Convert.ChangeType(parts[1], typeof(T));
|
||||
} catch
|
||||
}
|
||||
catch
|
||||
{
|
||||
referencedTo = (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFrom(parts[1]);
|
||||
referencedTo = (T)TypeDescriptor.GetConverter(typeof(T)).ConvertFrom(parts[1]);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -96,7 +97,7 @@ namespace xDataService.Extensions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a Collection of XReference<T> to it's String Representation ...
|
||||
/// Converts a Collection of XReference to it's String Representation ...
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
@@ -150,7 +151,7 @@ namespace xDataService.Extensions
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parse an string to XReference<T> Collection Representation ...
|
||||
/// Parse an string to XReference Collection Representation ...
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using xCommons.Extensions;
|
||||
using xModels.Base;
|
||||
using xDataService.Db;
|
||||
using xDataService.Interfaces;
|
||||
using xCommons.Extensions;
|
||||
using xDataService.Models;
|
||||
using xDataService.Providers;
|
||||
using xModels.Base;
|
||||
using xDataService.Interfaces;
|
||||
|
||||
namespace xDataService.Extensions
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user