Your program shall receive the location from the SQLite database file from an environment variable called CHIRPDBPATH, i.e., via dependency injection. In case no such variable is defined the database file shall be located under a user's temporary directory with the file name chirp.db.
That is, calling your program directly, e.g., with dotnet run will store the database file under <user's tempdir>, whereas calling it with, e.g., CHIRPDBPATH=./mychirp.dbdotnet run will store the file in the current directory under the file name mychirp.db.
Acceptance criteria:
CHIRPDBPATH,
i.e., via dependency injection. In case no such variable is defined the database file shall be located under a user's temporary directory with the file namechirp.db.
dotnet run
will store the database file under<user's tempdir>
, whereas calling it with, e.g.,CHIRPDBPATH=./mychirp.db
dotnet run
will store the file in the current directory under the file namemychirp.db.
Hints: Check the official documentation on how to get values from environment variables.