Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Storage #2

Open
pjlplourde opened this issue Jan 19, 2022 · 5 comments
Open

Data Storage #2

pjlplourde opened this issue Jan 19, 2022 · 5 comments

Comments

@pjlplourde
Copy link

What are you planning to use for data storage? SQL, SQLite, MySQL, MongoDB, CosmosDB, text files?

@kevball2
Copy link
Owner

My thought was to begin with writing out the data to a json file. I don't have much practice with working with JSON so I thought that would be a good place to start. Eventually I want to move to a web app with CosmosDB but want to get the logic sorted first.

@pjlplourde
Copy link
Author

A JSON file can only hold one single JSON object, so not ideal, and a text file or CSV cannot easily hold JSON data. My suggestion for the start is to either use MongoDB or CosmosDB to store your JSON data. This is handled in your class library in any event, so the UI doesn't matter and you can switch to a web app later if you wish. If you want, I can go ahead and create your DataAccessLibrary and set it up to work with your choice of MongoDB or CosmosDB, so that all you'll have to do is put the connection string in your appsettings.json.

@kevball2
Copy link
Owner

CosmoDB would be my preference then. If you would like to create the DataAccessLibrary that would be great! I had seen this ComsoDB project, but might be overkill - https://github.com/IEvangelist/azure-cosmos-dotnet-repository

@pjlplourde
Copy link
Author

Ok, I'll fork and create a DataAccessLibrary to use CosmosDB.

@pjlplourde
Copy link
Author

Pull request created. Should all be good except for (1) you will need the connection info for your CosmosDB to be put into the appsettings.json file and (2) you may need to map the db-side models to your ui-side models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants