public static bool IsDirty(ILibrary libVM, BookViewModel book) { var dao = new BookDao(); BookViewModel refBook = dao.FindBy(new Dictionary <string, object>() { { "ID", book.ID } }).Single().ToViewModel(); return(!book.Equals(refBook)); }