public void SetCurrentBook(BookLocal book) { var books = GetBooksLocal().ToList(); foreach (var b in books) { b.IsCurrent = false; db.SaveItem<BookLocal>(b); } book.ID = GetBookByPath(book.BookPath).ID; db.SaveItem<BookLocal>(book); var s = GetBooksLocal(); }
public void UpdateBookPosition(BookLocal book) { _repository.UpdateBookPosition (book); }
public void SetCurrentBook(Book book) { //int id = 0; //Int32.TryParse(book.ID, out id); BookLocal local = new BookLocal() { BookPath = book.BookPath, Position = book.Position, IsCurrent = true}; _repository.SetCurrentBook(local); }
public int SaveBookLocal(BookLocal item) { return _repository.SaveBookLocal(item); }
public void UpdateBookPosition(BookLocal book) { var lBook = db.GetItems<BookLocal>().FirstOrDefault(x => x.BookPath == book.BookPath); lBook.Position = book.Position; db.SaveItem (lBook); }
public int SaveBookLocal(BookLocal item) { return db.SaveItem<BookLocal>(item); }