Blazor connect to Sqllite

Anonymous
2023-11-19T14:13:09.4466667+00:00

I cloned the below app from github

Now I want to remove the below hardcoding and load question from sqllite

test.db3.

Could someone suggest how to connect to test.db3 and populate List<question>

C:\Users\allam\Downloads\Quizzing-master\Quizzing-master\Quizzing\Pages\QuizCardBase.cs



https://github.com/KalyanAllam/Quizzing/

   private void LoadQuestions()
        {
            Question q1 = new Question
            {
                QuestionTitle = "What is the capital of France?",
                Options = new List<string>() { "Nantes", "Lyon", "Paris", "Bruxelles" },
                Answer = "Paris"
            };

            Question q2 = new Question
            {
                QuestionTitle = "What is the capital of England?",
                Options = new List<string>() { "London", "Manchester", "Glasgow", "Edinburgh" },
                Answer = "London"
            };
             Questions.AddRange(new List<Question> { q1, q2, q3, q4 ,q5});         }
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,552 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.