コード例 #1
0
        public IActionResult GetAllUserBooks(string sessionID, int?userID)
        {
            if (sessionID == null || userID == null)
            {
                return(NullValues());
            }
            var user = VerifyUserSessionID(sessionID, userID);

            if (user == null)
            {
                return(InvalidSessionID());
            }
            var listToReturn = bookDao.GetAllBooksForUser(user);

            return(Ok(listToReturn));
        }
コード例 #2
0
 public void GetAllBooksForUserTest()
 {
     var user  = userDao.GetDefaultUser();
     var books = bookDao.GetAllBooksForUser(user);
 }