dynamic query support.

This commit is contained in:
David Lebee
2021-02-02 19:01:29 -05:00
parent 8175dc5f3d
commit ca307194db
26 changed files with 698 additions and 12 deletions
+29
View File
@@ -0,0 +1,29 @@
using PoweredSoft.CQRS.DynamicQuery.Abstractions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace Demo.DynamicQueries
{
public class Contact
{
public long Id { get; set; }
public string DisplayName { get; set; }
}
public class ContactQueryableProvider : IQueryableProvider<Contact>
{
public Task<IQueryable<Contact>> GetQueryableAsync(object query, CancellationToken cancelllationToken = default)
{
var ret = new List<Contact>
{
new Contact { Id = 1, DisplayName = "David L"},
new Contact { Id = 2, DisplayName = "John Doe"}
};
return Task.FromResult(ret.AsQueryable());
}
}
}