public string Save(Book aBook) { string message = ""; bool isRegNoExists = bookGateway.IsIsbnNoExists(aBook.Isbn); if (isRegNoExists) { message = "ISBN No already exists!"; } else { int rowsAffected = bookGateway.Insert(aBook); if (rowsAffected > 0) { message = "Saved successfully"; } else { message = "Sorry! Insertion failed."; } } return(message); }