using Raven.Client.Documents;
using Raven.Client.Documents.Session;
using System.Collections.Generic;
using System.Threading.Tasks;
using zero.Core.Entities;
namespace zero.Core.Api
{
public class PagesApi : IPagesApi
{
protected IDocumentStore Raven { get; private set; }
public PagesApi(IDocumentStore raven)
{
Raven = raven;
}
///
public async Task> GetAll()
{
using (IAsyncDocumentSession session = Raven.OpenAsyncSession())
{
return await session.Query().ToListAsync();
}
}
}
public interface IPagesApi
{
///
/// Get all available zero applications
///
Task> GetAll();
}
}