Skip to content

Create a connector for Firestore database in API project. #27

@hardikpatelse

Description

@hardikpatelse

Create a connector for the Firestore database within the API project. The objective is to enable seamless interaction between the API and Firestore for data storage and retrieval, leveraging the existing database design defined in the Data directory using Entity Framework Core.

Details:

Background & Context:

The current API project uses Entity Framework Core, and its database design (entities and models) is already implemented in the Data directory.
The goal is to integrate Firestore as an additional or alternative data source, ensuring compatibility with the existing database models.
Requirements:

Implement a Firestore connector/service that can perform CRUD (Create, Read, Update, Delete) operations for all entities defined in the Data directory.
Ensure the connector abstracts Firestore operations behind an interface, allowing dependency injection and easy swapping for EF Core or Firestore.
Map existing Entity Framework Core entities to Firestore documents—preserve field names and types as much as possible.
Use Google Cloud Firestore SDK for .NET for database connectivity and operations.
Provide appropriate configuration options for Firestore credentials, project ID, and environment settings.
Acceptance Criteria:

The API can perform CRUD operations on Firestore using the existing database models.
The connector is unit-tested and includes integration tests for basic data operations.
Documentation is provided for how to configure and use the Firestore connector/service.
Error handling and logging are implemented for failed operations or connectivity issues.
Additional Notes:

If there are specific entities or collections that require custom mapping or handling, document those requirements.
If there are architectural decisions (e.g., whether to support both EF Core and Firestore simultaneously or exclusively), please clarify.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions