Console Based CRUD application to track any habit using C# and SQLite.
- When the application starts, it should create a sqlite database, if one isn’t present.
- This habit can't be tracked by time (ex. hours of sleep), only by quantity (ex. number of water glasses a day)
- Users need to be able to input the date of the occurrence of the habit
- The application should store and retrieve data from a real database
- It should also create a table in the database, where the habit will be logged.
- The users should be able to insert, delete, update and view their logged habit.
- You should handle all possible errors so that the application never crashes.
- You can only interact with the database using ADO.NET. You can’t use mappers such as Entity Framework or Dapper.
- Follow the DRY Principle, and avoid code repetition.
- Your project needs to contain a Read Me file where you'll explain how your app works and tell a little bit about your thought progress. What was hard? What was easy? What have you learned?
-
SQLite database connection
- The program uses a SQLite db connection to store and read information.
- If no database exists, or the correct table does not exist they will be created on program start.
-
A console based UI where users can navigate by key presses
-
CRUD DB functions
- From the main menu users can Create, Read, Update or Delete entries for whichever date they want, entered in mm-DD-yyyy format.
- Time and Dates inputted are checked to make sure they are in the correct and realistic format.
-
Added Feature to let user decide on habit and even add any amount of habits
- C# (.NET)
- SQLite (Microsoft.Data.Sqlite)
- ADO.NET (Raw SQL queries, no ORMs like Dapper or Entity Framework)
- First application involving SQLite but not first time using SQL
- Syntax of ADO.NET new to me so had to understand first.
- SQLite Data Types: SQLite doesn't have a native
booleandata type. - Tried to keep methods simple
- Always create a new git branch for each issue or feature that is currently being worked on.
- CodeCademy C# course to get some basic practice with C# variables, methods and classes.
- Tutorial inspired by The C# Academy - Habit Tracker App. C# Beginner Project. CRUD Console, Sqlite, VSCode
