ADD : Update Model with favoritebooks methods

commands-19-09
Lou BRODA 1 year ago
parent 147193f535
commit a387a06a05

@ -21,6 +21,8 @@ namespace Model
Task<bool> AddToFavorites(string bookId);
Task<bool> RemoveFromFavorites(Book book);
Task<bool> RemoveFromFavorites(string bookId);
Task<Tuple<long, IEnumerable<Book>>> GetFavoritesBooks(int index, int count);
Task<Book> UpdateBook(Book updatedBook);

@ -421,5 +421,10 @@ namespace Stub
{
return Task.FromResult(Tuple.Create(Contacts.LongCount(), Contacts.Skip(index * count).Take(count)));
}
public Task<Tuple<long, IEnumerable<Book>>> GetFavoritesBooks(int index, int count)
{
return Task.FromResult(Tuple.Create(Favorites.LongCount(), Favorites.Skip(index * count).Take(count)));
}
}
}

Loading…
Cancel
Save