ADD : Avancements multiples en TP

commands-19-09
Lou BRODA 1 year ago
parent c13bcb1ffa
commit 6d16193450

@ -16,7 +16,6 @@ public partial class AppShell : Shell
Routing.RegisterRoute("library/note/", typeof(FiltrageNoteView)); Routing.RegisterRoute("library/note/", typeof(FiltrageNoteView));
Routing.RegisterRoute("library/contacts/", typeof(ContactsView)); Routing.RegisterRoute("library/contacts/", typeof(ContactsView));
Routing.RegisterRoute("library/tous/details/", typeof(DetailsLivreView)); Routing.RegisterRoute("library/tous/details/", typeof(DetailsLivreView));
Routing.RegisterRoute("library/add/", typeof(AddBookView));
InitializeComponent(); InitializeComponent();
} }
} }

@ -65,9 +65,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="View\AddBookView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ALirePlusTardView.xaml"> <MauiXaml Update="View\ALirePlusTardView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -34,6 +34,7 @@ public static class MauiProgram
.AddSingleton<EmpruntsPretsView>() .AddSingleton<EmpruntsPretsView>()
.AddSingleton<FavorisView>() .AddSingleton<FavorisView>()
.AddSingleton<ContactsView>() .AddSingleton<ContactsView>()
.AddSingleton<PopupISBNView>()
.AddSingleton<NavigatorVM>() .AddSingleton<NavigatorVM>()
@ -52,7 +53,8 @@ public static class MauiProgram
.AddSingleton<StatutLectureVM>() .AddSingleton<StatutLectureVM>()
.AddSingleton<EmpruntsPretsVM>() .AddSingleton<EmpruntsPretsVM>()
.AddSingleton<FavorisVM>() .AddSingleton<FavorisVM>()
.AddSingleton<ContactsVM>(); .AddSingleton<ContactsVM>()
.AddSingleton<PopupISBNVM>();
#if DEBUG #if DEBUG
builder.Logging.AddDebug(); builder.Logging.AddDebug();

@ -24,12 +24,5 @@ public partial class ALirePlusTardView : ContentPage
#region Methods #region Methods
protected override void OnAppearing()
{
base.OnAppearing();
ALirePlusTardVM.Manager.GetToBeReadBooksCommand.Execute(null);
}
#endregion #endregion
} }

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.AddBookView"
Title="AddBookView">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>

@ -1,9 +0,0 @@
namespace LivreLand.View;
public partial class AddBookView : ContentPage
{
public AddBookView()
{
InitializeComponent();
}
}

@ -65,8 +65,7 @@
ButtonNumber="1" ButtonNumber="1"
ButtonRedIconVisible="False" ButtonRedIconVisible="False"
ButtonBlackIconVisible="True" ButtonBlackIconVisible="True"
ButtonTappedCommand="{Binding BibliothequeVM.Navigator.NavigationCommand}" ButtonTappedCommand="{Binding BibliothequeVM.AllLoansBorrowingsNavigateCommand}"/>
CommandParameter="pret/"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
@ -75,8 +74,7 @@
ButtonIcon="arrow_forward.png" ButtonIcon="arrow_forward.png"
ButtonRedIconVisible="False" ButtonRedIconVisible="False"
ButtonBlackIconVisible="True" ButtonBlackIconVisible="True"
ButtonTappedCommand="{Binding BibliothequeVM.Navigator.NavigationCommand}" ButtonTappedCommand="{Binding BibliothequeVM.AllToReadBooksNavigateCommand}"/>
CommandParameter="later/"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
@ -85,8 +83,7 @@
ButtonIcon="eyeglasses.png" ButtonIcon="eyeglasses.png"
ButtonRedIconVisible="False" ButtonRedIconVisible="False"
ButtonBlackIconVisible="True" ButtonBlackIconVisible="True"
ButtonTappedCommand="{Binding BibliothequeVM.Navigator.NavigationCommand}" ButtonTappedCommand="{Binding BibliothequeVM.AllStatusBooksNavigateCommand}"/>
CommandParameter="statut/"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
@ -95,8 +92,7 @@
ButtonIcon="heart_fill.png" ButtonIcon="heart_fill.png"
ButtonRedIconVisible="False" ButtonRedIconVisible="False"
ButtonBlackIconVisible="True" ButtonBlackIconVisible="True"
ButtonTappedCommand="{Binding BibliothequeVM.Navigator.NavigationCommand}" ButtonTappedCommand="{Binding BibliothequeVM.AllFavorisBooksNavigateCommand}"/>
CommandParameter="favoris/"/>
<contentView:SeparatorEntireView/> <contentView:SeparatorEntireView/>
</VerticalStackLayout> </VerticalStackLayout>

@ -23,12 +23,5 @@ public partial class ContactsView : ContentPage
#region Methods #region Methods
protected override void OnAppearing()
{
base.OnAppearing();
ContactsVM.Manager.GetContactsCommand.Execute(null);
}
#endregion #endregion
} }

@ -23,7 +23,9 @@
<Grid Grid.Row="1" <Grid Grid.Row="1"
Margin="5"> Margin="5">
<Entry /> <Entry Text="{Binding Manager.EntryText}"
ReturnCommand="{Binding AddBookCommand}"
ReturnCommandParameter="{Binding Manager.EntryText}"/>
</Grid> </Grid>
</Grid> </Grid>
<Border.StrokeShape> <Border.StrokeShape>

@ -1,12 +1,14 @@
using CommunityToolkit.Maui.Views; using CommunityToolkit.Maui.Views;
using LivreLand.ViewModel;
namespace LivreLand.View.ContentViews; namespace LivreLand.View.ContentViews;
public partial class PopupISBNView : Popup public partial class PopupISBNView : Popup
{ {
public PopupISBNView() public PopupISBNView(PopupISBNVM popupISBNVM)
{ {
InitializeComponent(); InitializeComponent();
BindingContext = popupISBNVM;
Size = new Size(0.8 * (DeviceDisplay.Current.MainDisplayInfo.Width / DeviceDisplay.Current.MainDisplayInfo.Density), 0.5 * (DeviceDisplay.Current.MainDisplayInfo.Width / DeviceDisplay.Current.MainDisplayInfo.Density)); Size = new Size(0.8 * (DeviceDisplay.Current.MainDisplayInfo.Width / DeviceDisplay.Current.MainDisplayInfo.Density), 0.5 * (DeviceDisplay.Current.MainDisplayInfo.Width / DeviceDisplay.Current.MainDisplayInfo.Density));
} }
} }

@ -333,8 +333,8 @@
<contentView:DetailsLivreButtonView ButtonIcon="person.png" <contentView:DetailsLivreButtonView ButtonIcon="person.png"
ButtonTitle="Prêter le livre" ButtonTitle="Prêter le livre"
ButtonCommand="{Binding DetailsLivreVM.Navigator.NavigationCommand}" ButtonCommand="{Binding DetailsLivreVM.LoanBookCommand}"
ButtonCommandParameter="/contacts"/> ButtonCommandParameter="{Binding DetailsLivreVM.Book}"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>

@ -24,13 +24,5 @@ public partial class EmpruntsPretsView : ContentPage
#region Methods #region Methods
protected override void OnAppearing()
{
base.OnAppearing();
EmpruntsPretsVM.Manager.GetCurrentLoansCommand.Execute(null);
EmpruntsPretsVM.Manager.GetCurrentBorrowingsCommand.Execute(null);
}
#endregion #endregion
} }

@ -29,12 +29,5 @@ public partial class FavorisView : ContentPage
//App.Current.MainPage.Navigation.PushAsync(new DetailsLivreView()); //App.Current.MainPage.Navigation.PushAsync(new DetailsLivreView());
} }
protected override void OnAppearing()
{
base.OnAppearing();
FavorisVM.Manager.GetFavoriteBooksCommand.Execute(null);
}
#endregion #endregion
} }

@ -24,12 +24,5 @@ public partial class StatutLectureView : ContentPage
#region Methods #region Methods
protected override void OnAppearing()
{
base.OnAppearing();
StatutLectureVM.Manager.GetBooksFromCollectionCommand.Execute(null);
}
#endregion #endregion
} }

@ -19,6 +19,14 @@ namespace LivreLand.ViewModel
public ICommand AllBooksNavigateCommand { get; private set; } public ICommand AllBooksNavigateCommand { get; private set; }
public ICommand AllLoansBorrowingsNavigateCommand { get; private set; }
public ICommand AllFavorisBooksNavigateCommand { get; private set; }
public ICommand AllStatusBooksNavigateCommand { get; private set; }
public ICommand AllToReadBooksNavigateCommand { get; private set; }
public ICommand AllAuthorsNavigateCommand { get; private set; } public ICommand AllAuthorsNavigateCommand { get; private set; }
public ICommand AllDatesNavigateCommand { get; private set; } public ICommand AllDatesNavigateCommand { get; private set; }
@ -34,6 +42,10 @@ namespace LivreLand.ViewModel
Navigator = navigatorVM; Navigator = navigatorVM;
Manager = managerVM; Manager = managerVM;
AllBooksNavigateCommand = new RelayCommand(() => AllBooksNavigate()); AllBooksNavigateCommand = new RelayCommand(() => AllBooksNavigate());
AllLoansBorrowingsNavigateCommand = new RelayCommand(() => AllLoansBorrowingsNavigate());
AllFavorisBooksNavigateCommand = new RelayCommand(() => AllFavorisBooksNavigate());
AllStatusBooksNavigateCommand = new RelayCommand(() => AllStatusBooksNavigate());
AllToReadBooksNavigateCommand = new RelayCommand(() => AllToReadBooksNavigate());
AllAuthorsNavigateCommand = new RelayCommand(() => AllAuthorsNavigate()); AllAuthorsNavigateCommand = new RelayCommand(() => AllAuthorsNavigate());
AllDatesNavigateCommand = new RelayCommand(() => AllDatesNavigate()); AllDatesNavigateCommand = new RelayCommand(() => AllDatesNavigate());
AllRatingsNavigateCommand = new RelayCommand(() => AllRatingsNavigate()); AllRatingsNavigateCommand = new RelayCommand(() => AllRatingsNavigate());
@ -49,6 +61,31 @@ namespace LivreLand.ViewModel
Navigator.NavigationCommand.Execute("/tous"); Navigator.NavigationCommand.Execute("/tous");
} }
private void AllLoansBorrowingsNavigate()
{
Manager.GetCurrentLoansCommand.Execute(null);
Manager.GetCurrentBorrowingsCommand.Execute(null);
Navigator.NavigationCommand.Execute("/pret");
}
private void AllFavorisBooksNavigate()
{
Manager.GetFavoriteBooksCommand.Execute(null);
Navigator.NavigationCommand.Execute("/favoris");
}
private void AllStatusBooksNavigate()
{
Manager.GetBooksFromCollectionCommand.Execute(null);
Navigator.NavigationCommand.Execute("/statut");
}
private void AllToReadBooksNavigate()
{
Manager.GetToBeReadBooksCommand.Execute(null);
Navigator.NavigationCommand.Execute("/later");
}
private void AllAuthorsNavigate() private void AllAuthorsNavigate()
{ {
Manager.GetAllAuthorsCommand.Execute(null); Manager.GetAllAuthorsCommand.Execute(null);

@ -69,7 +69,9 @@ namespace LivreLand.ViewModel
var toast = Toast.Make("Livre prêté !", CommunityToolkit.Maui.Core.ToastDuration.Short); var toast = Toast.Make("Livre prêté !", CommunityToolkit.Maui.Core.ToastDuration.Short);
await toast.Show(); await toast.Show();
Navigator.PopupBackButtonNavigationCommand.Execute(null); Manager.GetCurrentLoansCommand.Execute(null);
Manager.GetCurrentBorrowingsCommand.Execute(null);
Navigator.NavigationCommand.Execute("/pret");
} }
#endregion #endregion

@ -73,6 +73,8 @@ namespace LivreLand.ViewModel
public ICommand AddBookToReadListCommand { get; private set; } public ICommand AddBookToReadListCommand { get; private set; }
public ICommand LoanBookCommand { get; private set; }
public ICommand RemoveBookCommand { get; private set; } public ICommand RemoveBookCommand { get; private set; }
#endregion #endregion
@ -88,6 +90,7 @@ namespace LivreLand.ViewModel
ShowPickerCommand = new RelayCommand(() => ShowPicker()); ShowPickerCommand = new RelayCommand(() => ShowPicker());
AddRemoveBookToFavoritesCommand = new RelayCommand<BookVM>((bookVM) => AddRemoveBookToFavorites(bookVM)); AddRemoveBookToFavoritesCommand = new RelayCommand<BookVM>((bookVM) => AddRemoveBookToFavorites(bookVM));
AddBookToReadListCommand = new RelayCommand<BookVM>((bookVM) => AddBookToReadList(bookVM)); AddBookToReadListCommand = new RelayCommand<BookVM>((bookVM) => AddBookToReadList(bookVM));
LoanBookCommand = new RelayCommand<BookVM>((bookVM) => LoanBook(bookVM));
RemoveBookCommand = new RelayCommand<BookVM>((bookVM) => RemoveBook(bookVM)); RemoveBookCommand = new RelayCommand<BookVM>((bookVM) => RemoveBook(bookVM));
} }
@ -118,6 +121,7 @@ namespace LivreLand.ViewModel
var toast = Toast.Make("Livre ajouté aux favoris !", CommunityToolkit.Maui.Core.ToastDuration.Short); var toast = Toast.Make("Livre ajouté aux favoris !", CommunityToolkit.Maui.Core.ToastDuration.Short);
await toast.Show(); await toast.Show();
Manager.GetFavoriteBooksCommand.Execute(null);
Navigator.NavigationCommand.Execute("/favoris"); Navigator.NavigationCommand.Execute("/favoris");
} }
else else
@ -129,6 +133,7 @@ namespace LivreLand.ViewModel
var toast = Toast.Make("Livre supprimé des favoris !", CommunityToolkit.Maui.Core.ToastDuration.Short); var toast = Toast.Make("Livre supprimé des favoris !", CommunityToolkit.Maui.Core.ToastDuration.Short);
await toast.Show(); await toast.Show();
Manager.GetFavoriteBooksCommand.Execute(null);
Navigator.NavigationCommand.Execute("/favoris"); Navigator.NavigationCommand.Execute("/favoris");
} }
} }
@ -140,9 +145,17 @@ namespace LivreLand.ViewModel
var toast = Toast.Make("Livre ajouté à la liste À lire plus tard !", CommunityToolkit.Maui.Core.ToastDuration.Short); var toast = Toast.Make("Livre ajouté à la liste À lire plus tard !", CommunityToolkit.Maui.Core.ToastDuration.Short);
await toast.Show(); await toast.Show();
Manager.GetToBeReadBooksCommand.Execute(null);
Navigator.NavigationCommand.Execute("/later"); Navigator.NavigationCommand.Execute("/later");
} }
private void LoanBook(BookVM bookVM)
{
Manager.SelectedBook = bookVM;
Manager.GetContactsCommand.Execute(null);
Navigator.NavigationCommand.Execute("contacts");
}
private async Task RemoveBook(BookVM bookVM) private async Task RemoveBook(BookVM bookVM)
{ {
Manager.RemoveBookCommand.Execute(bookVM); Manager.RemoveBookCommand.Execute(bookVM);

@ -28,7 +28,7 @@ namespace LivreLand.ViewModel
NavigationCommand = new Command(async (target) => await Shell.Current.GoToAsync($"//library/{target}")); NavigationCommand = new Command(async (target) => await Shell.Current.GoToAsync($"//library/{target}"));
PopupHomePlusNavigationCommand = new Command(() => App.Current.MainPage.ShowPopup(new PopupHomePlusButtonView(this))); PopupHomePlusNavigationCommand = new Command(() => App.Current.MainPage.ShowPopup(new PopupHomePlusButtonView(this)));
PopupISBNNavigationCommand = new Command(() => App.Current.MainPage.ShowPopup(new PopupISBNView())); PopupISBNNavigationCommand = new Command(() => App.Current.MainPage.ShowPopup(new PopupISBNView(Application.Current.Handler.MauiContext.Services.GetService<PopupISBNVM>())));
PopupBackButtonNavigationCommand = new Command(() => App.Current.MainPage.Navigation.PopAsync()); PopupBackButtonNavigationCommand = new Command(() => App.Current.MainPage.Navigation.PopAsync());
} }

@ -0,0 +1,52 @@
using CommunityToolkit.Maui.Alerts;
using Model;
using PersonalMVVMToolkit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using ViewModels;
namespace LivreLand.ViewModel
{
public class PopupISBNVM : BaseViewModel
{
#region Properties
public NavigatorVM Navigator { get; private set; }
public ManagerVM Manager { get; private set; }
public ICommand AddBookCommand { get; private set; }
#endregion
#region Constructor
public PopupISBNVM(NavigatorVM navigatorVM, ManagerVM managerVM)
{
Navigator = navigatorVM;
Manager = managerVM;
AddBookCommand = new RelayCommand<string>((text) => AddBook(text));
}
#endregion
#region Methods
private async Task AddBook(string entryText)
{
Manager.AddBookCommand.Execute(entryText);
var toast = Toast.Make("Livre ajouté !", CommunityToolkit.Maui.Core.ToastDuration.Short);
await toast.Show();
Manager.GetBooksFromCollectionCommand.Execute(null);
Navigator.NavigationCommand.Execute("/tous");
}
#endregion
}
}

@ -48,6 +48,7 @@ namespace ViewModels
private ContactVM selectedContact; private ContactVM selectedContact;
private LoanVM selectedLoan; private LoanVM selectedLoan;
private BorrowingVM selectedBorrowing; private BorrowingVM selectedBorrowing;
private string entryText;
private string givenFirstName; private string givenFirstName;
private string givenLastName; private string givenLastName;
@ -257,6 +258,19 @@ namespace ViewModels
} }
} }
public string EntryText
{
get { return entryText; }
set
{
if (entryText != value)
{
entryText = value;
OnPropertyChanged(nameof(EntryText));
}
}
}
public string GivenFirstName public string GivenFirstName
{ {
get { return givenFirstName; } get { return givenFirstName; }
@ -383,7 +397,7 @@ namespace ViewModels
PreviousCommand = new RelayCommand(() => Previous()); PreviousCommand = new RelayCommand(() => Previous());
NextCommand = new RelayCommand(() => Next()); NextCommand = new RelayCommand(() => Next());
GetBooksFromCollectionCommand = new RelayCommand(() => GetBooksFromCollection()); GetBooksFromCollectionCommand = new RelayCommand(() => GetBooksFromCollection());
AddBookCommand = new RelayCommand<BookVM>((bookVM) => AddBook(bookVM)); AddBookCommand = new RelayCommand<string>((isbn) => AddBook(isbn));
UpdateBookCommand = new RelayCommand<BookVM>((bookVM) => UpdateBook(bookVM)); UpdateBookCommand = new RelayCommand<BookVM>((bookVM) => UpdateBook(bookVM));
UpdateStatusBookCommand = new RelayCommand<BookVM>((bookVM) => UpdateStatusBook(bookVM)); UpdateStatusBookCommand = new RelayCommand<BookVM>((bookVM) => UpdateStatusBook(bookVM));
UpdateToBeReadBookCommand = new RelayCommand<BookVM>((bookVM) => UpdateToBeReadBook(bookVM)); UpdateToBeReadBookCommand = new RelayCommand<BookVM>((bookVM) => UpdateToBeReadBook(bookVM));
@ -450,10 +464,13 @@ namespace ViewModels
OnPropertyChanged(nameof(AllBooks)); OnPropertyChanged(nameof(AllBooks));
} }
private async Task AddBook(BookVM bookVM) private async Task AddBook(string isbn)
{ {
await Model.AddBookToCollection(bookVM.Id); var result = await Model.GetBookByISBN(isbn);
GetBooksFromCollectionCommand.Execute(null); if (result != null)
{
await Model.AddBookToCollection(result.Id);
}
} }
private async Task UpdateBook(BookVM bookVM) private async Task UpdateBook(BookVM bookVM)
@ -493,13 +510,14 @@ namespace ViewModels
foreach (var b in someBooks.Select(b => new BookVM(b))) foreach (var b in someBooks.Select(b => new BookVM(b)))
{ {
books.Add(b); books.Add(b);
GroupedBooks = AllBooks.GroupBy(b => b.Author).OrderBy(group => group.Key);
} }
OnPropertyChanged(nameof(AllBooks)); OnPropertyChanged(nameof(AllBooks));
} }
private async Task GetAllAuthors() private async Task GetAllAuthors()
{ {
var result = await Model.GetBooksFromCollection(0, 20); var result = await Model.GetBooksFromCollection(0, 1000);
IEnumerable<Book> someBooks = result.books; IEnumerable<Book> someBooks = result.books;
books.Clear(); books.Clear();
authors.Clear(); authors.Clear();
@ -522,9 +540,10 @@ namespace ViewModels
books.Clear(); books.Clear();
foreach (var b in someBooks.Select(b => new BookVM(b))) foreach (var b in someBooks.Select(b => new BookVM(b)))
{ {
if (b.PublishDate == SelectedDate.PublishDate) if (b.PublishDate.Year == SelectedDate.PublishDate.Year)
{ {
books.Add(b); books.Add(b);
GroupedBooks = AllBooks.GroupBy(b => b.Author).OrderBy(group => group.Key);
} }
} }
OnPropertyChanged(nameof(AllBooks)); OnPropertyChanged(nameof(AllBooks));
@ -532,7 +551,7 @@ namespace ViewModels
private async Task GetAllPublishDates() private async Task GetAllPublishDates()
{ {
var result = await Model.GetBooksFromCollection(0, 20); var result = await Model.GetBooksFromCollection(0, 1000);
IEnumerable<Book> someBooks = result.books; IEnumerable<Book> someBooks = result.books;
books.Clear(); books.Clear();
publishDates.Clear(); publishDates.Clear();
@ -559,17 +578,20 @@ namespace ViewModels
NbBooks = result.count; NbBooks = result.count;
IEnumerable<Book> someBooks = result.books; IEnumerable<Book> someBooks = result.books;
books.Clear(); books.Clear();
var filteredBooks = someBooks.Where(b => b.UserRating.HasValue && Math.Floor(b.UserRating.Value) == SelectedRating.Average); foreach (var book in someBooks.Select(b => new BookVM(b)))
foreach (var book in filteredBooks)
{ {
books.Add(new BookVM(book)); if (book.UserRating == SelectedRating.Average)
{
//books.Add(new BookVM(book));
GroupedBooks = AllBooks.GroupBy(b => b.Author).OrderBy(group => group.Key);
}
} }
OnPropertyChanged(nameof(AllBooks)); OnPropertyChanged(nameof(AllBooks));
} }
private async Task GetAllRatings() private async Task GetAllRatings()
{ {
var result = await Model.GetBooksFromCollection(0, 20); var result = await Model.GetBooksFromCollection(0, 1000);
IEnumerable<Book> someBooks = result.books; IEnumerable<Book> someBooks = result.books;
books.Clear(); books.Clear();
ratings.Clear(); ratings.Clear();
@ -621,7 +643,7 @@ namespace ViewModels
private async Task GetToBeReadBooks() private async Task GetToBeReadBooks()
{ {
var result = await Model.GetBooksFromCollection(0, 20); var result = await Model.GetBooksFromCollection(0, 1000);
IEnumerable<Book> someBooks = result.books; IEnumerable<Book> someBooks = result.books;
books.Clear(); books.Clear();
toBeReadBooks.Clear(); toBeReadBooks.Clear();
@ -637,7 +659,7 @@ namespace ViewModels
private async Task GetFavoriteBooks() private async Task GetFavoriteBooks()
{ {
var result = await Model.GetFavoritesBooks(Index, Count); var result = await Model.GetFavoritesBooks(0, 1000);
IEnumerable<Book> someBooks = result.books; IEnumerable<Book> someBooks = result.books;
books.Clear(); books.Clear();
favoriteBooks.Clear(); favoriteBooks.Clear();

Loading…
Cancel
Save