//using FluentValidation; //using FluentValidation.Results; //using Raven.Client.Documents; //using Raven.Client.Documents.Linq; //using Raven.Client.Documents.Session; //using System; //using System.Collections.Generic; //using System.Threading.Tasks; //using zero.Core.Entities; //using zero.Core.Extensions; //namespace zero.Core.Api //{ // public class CollectionHistoryApi : AppAwareBackofficeApi, ICollectionHistoryApi // { // public CollectionHistoryApi(IBackofficeStore store) : base(store) // { // Scope.IncludeShared = true; // } // /// // public async Task GetLastEditedEntityBy(string userId) where T : IZeroEntity // { // using IAsyncDocumentSession session = Raven.OpenAsyncSession(); // return await session.Query() // .Scope(Scope) // .OrderByDescending(x => x.l) // .ThenBy(x => x.Name) // .ToListAsync(); // } // /// // public async Task> GetAll(string languageId) // { // using (IAsyncDocumentSession session = Raven.OpenAsyncSession()) // { // return await session.Query() // .Scope(Scope) // .Where(x => x.LanguageId == languageId) // .OrderByDescending(x => x.IsPreferred) // .ThenBy(x => x.Name) // .ToListAsync(); // } // } // /// // public async Task> GetByQuery(string languageId, ListQuery query) // { // query.SearchSelector = country => country.Name; // using (IAsyncDocumentSession session = Raven.OpenAsyncSession()) // { // return await session.Query() // .Scope(Scope) // .Where(x => x.LanguageId == languageId) // .OrderByDescending(x => x.IsPreferred) // .ThenBy(x => x.Name) // .ToQueriedListAsync(query); // } // } // } // public interface ICollectionHistoryApi // { // /// // /// Get country by Id // /// // Task GetById(string id); // /// // /// Get countries by ids // /// // Task> GetByIds(params string[] ids); // /// // /// Get all available countries // /// // Task> GetAll(string languageId); // /// // /// Get all available countries (with query) // /// // Task> GetByQuery(string languageId, ListQuery query); // /// // /// Creates or updates a country // /// // Task> Save(ICountry model); // /// // /// Deletes a country by Id // /// // Task> Delete(string id); // } //}