C# Console Application to Log Habits. Console based CRUD application to log Habits. Developed using C# and SQLite.
- This is an application where you’ll register one habit.
- This habit can't be tracked by time (ex. hours of sleep), only by quantity (ex. number of water glasses a day)
- The application should store and retrieve data from a real database
- When the application starts, it should create a sqlite database, if one isn’t present.
- It should also create a table in the database, where the habit will be logged.
- The app should show the user a menu of options.
- 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.
- The application should only be terminated when the user inserts 0.
- You can only interact with the database using raw SQL. You can’t use mappers such as Entity Framework.
- Your project needs to contain a Read Me file where you'll explain how your app works. Here's a nice example:
-
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 yyyy-MM-dd format.
- Time and Dates inputted are checked to make sure they are in the correct and realistic format.
-
View All Habit Logs by pressing 1
-
To log new Habit press 2
-
To delete a Record press 3
-
To update a Record press 4
-
To view all Habit press 5
-
To Enter a New Habit press 6
-
Basic Report for current Year
- Let the users create their own habits to track. That will require that you let them choose the unit of measurement of each habit.
- Seed Data into the database automatically when the database gets created for the first time, generating a few habits and inserting a hundred records with randomly generated values. This is specially helpful during development so you don't have to reinsert data every time you create the database.
- Create a report functionality where the users can view specific information (i.e. how many times the user ran in a year? how many kms?) SQL allows you to ask very interesting things from your database.
- Need to move back to main menu
- Still need to refactor the code to catch exceptions
- Using Async to interact with database