using FluentValidation; using Raven.Client.Documents; using Raven.Client.Documents.Linq; using System.Collections.Generic; using zero.Core.Entities; using zero.Core.Extensions; namespace zero.Core.Backoffice { public class CountriesBackofficeService : BackofficeService, ICountriesBackofficeService { public CountriesBackofficeService(IZeroContext context, IValidator validator) : base(context, validator) { } /// public override IAsyncEnumerable Stream() { return base.Stream(q => q.OrderByDescending(x => x.IsPreferred).ThenBy(x => x.Name)); } /// //public async Task> GetByQuery(string languageId, ListQuery query) //{ // query.SearchSelector = country => country.Name; // using IAsyncDocumentSession session = Store.OpenAsyncSession(); // return await session.Query() // .OrderByDescending(x => x.IsPreferred) // .ThenBy(x => x.Name) // .ToQueriedListAsync(query); //} } public interface ICountriesBackofficeService : IBackofficeService { } }