C
C#15mo ago
Dumnersm

❔ Were is the data stored at in this project?

i had a friend do the data side of things but now i need to acces the data can someone help sorry for the zip file it was better to compress it . https://drive.google.com/file/d/1LRdsGUJtICae_sFeoH21UXatdBrbxnJl/view?usp=sharing
27 Replies
Angius
Angius15mo ago
Not gonna download a random zip file, sorry Upload it to Github or something
Dumnersm
DumnersmOP15mo ago
ok got it thanks
Dumnersm
DumnersmOP15mo ago
@ZZZZZZZZZZZZZZZZZZZZZZZZZ i just includded the data side of things: https://github.com/Dumnersm580/Rest-inventory-
GitHub
GitHub - Dumnersm580/Rest-inventory-
Contribute to Dumnersm580/Rest-inventory- development by creating an account on GitHub.
Angius
Angius15mo ago
Seems the data is stored in a file Either a Json file, an Excel file, or a CSV file
Dumnersm
DumnersmOP15mo ago
that for exportting the data from what i can tell it has something to do with the repository
Angius
Angius15mo ago
It's an overengineered bloated mess in general But a service calls a repository, a repository calls a provider, the provider reads/writes data
Anchy
Anchy15mo ago
you can find out what provider is being used in the entrypoint where you register services
Dumnersm
DumnersmOP15mo ago
were would i find it? sorry kind new to this
Anchy
Anchy15mo ago
in the entrypoint of your application find where the services are registered
Dumnersm
DumnersmOP15mo ago
?
Angius
Angius15mo ago
Angius
Angius15mo ago
Means the Json file provider is used So everything is saved in a Json file
Dumnersm
DumnersmOP15mo ago
Is there anyway to tell were the file is saved to?
Angius
Angius15mo ago
The provider has a path parameter passed to most of it's methods So track down where they're called from and what gets passed there
Anchy
Anchy15mo ago
clue: check the utils directory
Dumnersm
DumnersmOP15mo ago
Thanks Holy shit I have gone through everything but that damn dir thanks guys Sorry for the idiot experience no i feel even dumber all the exploser.cs does is all you to export the data as a type of file
Anchy
Anchy15mo ago
Explorer is used by the JsonFileProvider to get the DefaultPath if no path is handed in, then that path is used
Dumnersm
DumnersmOP15mo ago
this is all that is in that csv file no userdata or anything
Anchy
Anchy15mo ago
check the default path location in your case, appdata
Dumnersm
DumnersmOP15mo ago
what would the data file look like?
Angius
Angius15mo ago
It would have a .json extension And would be in Json format And it would store data similar to your models So if you have a model
class Foo
{
public string Name { get; set; }
public int ShoeSize { get; set; }
}
class Foo
{
public string Name { get; set; }
public int ShoeSize { get; set; }
}
you can expect to see
{
"name": "Bobbert",
"shoe_size": 42
}
{
"name": "Bobbert",
"shoe_size": 42
}
somewhere in the Json file
Dumnersm
DumnersmOP15mo ago
any name for the json or would it be random
Angius
Angius15mo ago
It would be named the way it's named in the code
Dumnersm
DumnersmOP15mo ago
thanks i found them
Dumnersm
DumnersmOP15mo ago
Dumnersm
DumnersmOP15mo ago
ughhhhhh i really do appreciate it guys i am going to rewrite the data side to store it to the cloud
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server