public OperationResult EditBook(Book book, string userName, string guid)
 {
     if (!CheckAuthenticated(userName, guid))
     {
         return(new OperationResult(Library.Models.OperationResult.ErrorEnum.NotAuthenticated,
                                    "Please authenticate first!"));
     }
     if (book == null || !book.ValidateEdit())
     {
         return(new OperationResult(Library.Models.OperationResult.ErrorEnum.InvalidInputData, "Invalid or missing book data"));
     }
     try
     {
         using (BookData bookData = new BookData())
         {
             bookData.EditBook(book);
             return(new OperationResult());
         }
     }
     catch (Exception ex)
     {
         return(new OperationResult(Library.Models.OperationResult.ErrorEnum.InternalProblem, "Some internal problem has occured"));
     }
 }