Closed RiccardoCafa closed 3 months ago
Integrated Firestore with the application. I'll be updating CONTRIBUTING in order to get everything set for development environment.
I've created a FirestoreService to easily access data from a firestore document.
Task<List<T>> GetAllDocumentsAsync<T>(string collectionName)
Task<List<T>> GetAllDocumentsAsync<T>()
Task AddDocumentAsync<T>(string collectionName, T document)
Task AddDocumentAsync<T>(T document)
Those that doesn't require a collectionName as parameter, expects that the generic T has a CollectionNameAttribute assigned to the class. For example:
[CollectionName("transactions")] public class Transactions { ... }
In that way we can define the collection name in the class declaration and avoid writting wrong.
@LucasSNSantos @RaspyThommy can you review the code to check if it's ok for you?
Integrated Firestore with the application. I'll be updating CONTRIBUTING in order to get everything set for development environment.
I've created a FirestoreService to easily access data from a firestore document.
Task<List<T>> GetAllDocumentsAsync<T>(string collectionName)
Task<List<T>> GetAllDocumentsAsync<T>()
Task AddDocumentAsync<T>(string collectionName, T document)
Task AddDocumentAsync<T>(T document)
Those that doesn't require a collectionName as parameter, expects that the generic T has a CollectionNameAttribute assigned to the class. For example:
In that way we can define the collection name in the class declaration and avoid writting wrong.
@LucasSNSantos @RaspyThommy can you review the code to check if it's ok for you?