public HomePageViewModel(INavigationService navigationService, IBooksDB booksDB) { _booksDB = booksDB; /* withourt IOC INagavigationService has to new up a concrete version of service * _navigationService= new SomeService()*/ _navigationService = navigationService; addbookscmd = new Command(addbooksimplementation); viewbookscmd = new Command(ViewBooksFromDb); deletebookscmd = new Command(DeleteBooksFromDB); }
public ViewBooksViewModel(IBooksDB BooksDB) { _booksDB = BooksDB; BooksList(); }
public AddBooksViewModel(IBooksDB bookDB, INavigationService navigationService) { _navigationService = navigationService; AddBookCommand = new Command(AddBookToDb); _bookDB = bookDB; }