Skip to content

Flashcards is a C# application using SQL Server and Dapper. It lets users create and manage flashcard stacks, add questions and answers, practice, and review study session statistics. The app features a user-friendly interface with clear menus and prompts, along with input validation to ensure data accuracy.

License

Notifications You must be signed in to change notification settings

Dejmenek/Flashcards

Repository files navigation

Flashcards

Table of Contents

General Info

Project made for @TheCSharpAcademy.
This project is a basic flashcards application written in C# using SQL Server and Dapper for data access.
It allows users to create stacks, add flashcards with questions and answers, see study sessions statistics, and practice their knowledge.

Technologies

Features

  • Create and manage stacks of flashcards.
  • Add flashcards with questions and answers.
  • Practise flashcards.
  • Review study sessions statistics.
  • User-friendly interface: Provides clear menus and prompts for interaction.
  • Input validation: Ensure data entered by the user is valid.

Examples

  • Main Menu
    image
  • Manage Stacks
    image
    image
  • Manage Flashcards
    image
  • Study Session
    image
  • View Study Sessions
    image
  • View monthly study session reports per stack:
    • Average Score
      image
    • Number of sessions
      image

Instalation and Setup

  1. Clone or download this project repository.
  2. Open the solution file (Flashcards.Dejmenek.sln) in Visual Studio.
  3. Install the required NuGet packages:
    • Dapper
    • System.Data.SqlClient
    • Spectre.Console
    • Spectre.Console.Cli
    • System.Configuration.ConfigurationManager
  4. Update the App.config file with your SQL Server connection string details.

Requirements

  • This is an application where the users will create Stacks of Flashcards.
  • You'll need two different tables for stacks and flashcards. The tables should be linked by a foreign key.
  • Stacks should have an unique name.
  • Every flashcard needs to be part of a stack. If a stack is deleted, the same should happen with the flashcard.
  • You should use DTOs to show the flashcards to the user without the Id of the stack it belongs to.
  • When showing a stack to the user, the flashcard Ids should always start with 1 without gaps between them. If you have 10 cards and number 5 is deleted, the table should show Ids from 1 to 9.
  • After creating the flashcards functionalities, create a "Study Session" area, where the users will study the stacks. All study sessions should be stored, with date and score.
  • The study and stack tables should be linked. If a stack is deleted, it's study sessions should be deleted.
  • The project should contain a call to the study table so the users can see all their study sessions. This table receives insert calls upon each study session, but there shouldn't be update and delete calls to it.

Challenges

  • Try to create a report system where you can see the number of sessions per month per stack.
  • Try to create a report system where you can see the average score per month per stack.

Things Learned

I have some previous experience with other DBMS like MySQL and SQLite so using SQL Server wasn't that hard.
I only had to look up for data types and how to create pivot tables. Unfortunately, I encountered an issue with auto inrecementing ids in tables.
When inserting a new record, the id would jump to 1000. It was weird, because it only occurred in the flashcards table.
I removed all the tables and then recreated them. Now it works as intended😅.

I've also learned about Data Transfer Objects (DTOs).
They provide a clean way to transfer data between different layers of an application, reducing the amount of unnecessary data sent. In the future, I'd like to develop this project into a full-stack app with more features😁.

Used Resources

About

Flashcards is a C# application using SQL Server and Dapper. It lets users create and manage flashcard stacks, add questions and answers, practice, and review study session statistics. The app features a user-friendly interface with clear menus and prompts, along with input validation to ensure data accuracy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages