So I am writing my datalayer for a database, however I want to use one instance of that database for all the read and write methods in my datalayer class.
In order for me to initialize the database, I need to use the "await" keyword because it's an async function.
I planned to initialize the database at the constructor of my base datalayer class.
but I can't use "await" in the constructor.
So I decided to use GetAwaiter().GetResult().
It works, but I don't see this often. So I don't think it's appropriate.
What do you think?