I am currently writing an ASP.NET Core web application that should run on Windows and Linux (Ubuntu 16.04). I have some data that I want to store, but it is so small, using a database will be a huge loss of performance. Not to mention that the installation procedure will be twice as long.
That is why I want to save this information in a file. In the .NET Framework, I would use something like Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)to get a directory in which I can store application files. Unfortunately, this method is not available in .NET Core 1.1 .
Is there a way to get a folder for recording without hard coding?
Below is an example of the data I want to write. There will be only about 5 devices on this list.
<devices>
<device>
<id>0</id>
<name>xxx</name>
<physicaladdress>yyyyyyyyy</physicaladdress>
</device>
...
<device>
<id>5</id>
<name>xxx</name>
<physicaladdress>yyyyyyyyy</physicaladdress>
</device>
</devices>
source
share