示例#1
0
        public static async Task <UserVM> GetUserVMAsync(string username, bool loggedIn)
        {
            List <Quiz> quizzes = new List <Quiz>();

            quizzes = JsonConvert.DeserializeObject <List <Quiz> >(await MongoManager.GetAllQuizzesAsync(username));

            var userVM = new UserVM(username, quizzes, loggedIn);

            return(userVM);
        }