- General Info
- Technologies
- Features
- Examples
- Instalation and Setup
- Requirements
- Challenges
- Things Learned
- Used Resources
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.
- C#
- SQL Server
- Dapper
- Spectre.Console
- 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.
- Main Menu
- Manage Stacks
- Manage Flashcards
- Study Session
- View Study Sessions
- View monthly study session reports per stack:
- Clone or download this project repository.
- Open the solution file (Flashcards.Dejmenek.sln) in Visual Studio.
- Install the required NuGet packages:
- Dapper
- System.Data.SqlClient
- Spectre.Console
- Spectre.Console.Cli
- System.Configuration.ConfigurationManager
- Update the App.config file with your SQL Server connection string details.
- 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.
- 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.
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😁.
- SQL Server Tutorial used to learn some SQL Server syntax
- C# Corner used to learn about DTOs