public CollectionViewModel(string title, string filter, int page, Collection collection)
        {
            var stats = collection.GetStats();
            var pagination = new Pagination(page, 20, (int)stats.count);

            Title = title;
            DatabaseName = collection.DatabaseName;
            CollectionName = collection.Name;
            Stats = stats;
            
            Page = pagination.Page;
            LastPage = pagination.LastPage;

            Docs = collection.ListDocs(filter, pagination);
        }
Exemplo n.º 2
0
 public DocumentValidator(Schema schema, Collection collection)
 {
     _schema = schema;
     _collection = collection;
 }