This Real Estate Listing API serves as a baseline project for assessing the skills of candidates applying for the Senior C# Developer position. It utilizes .NET 6 with an in-memory database managed by Entity Framework Core, and is documented using Swagger.
The project is designed to evaluate candidates' proficiency in enhancing an existing API framework by adhering to best practices in coding, implementing design patterns, and ensuring the application's scalability and maintainability.
- Framework: .NET 8
- Database: In-Memory Database (Entity Framework Core)
- API Documentation: Swagger/OpenAPI
To run this project locally:
- Install the .NET SDK on your machine.
- Clone the repository to your preferred location.
- Open a terminal at the project's root directory.
- Run the following commands:
dotnet restore dotnet build dotnet run `
- Navigate to
http://localhost:(5236 or 7289)/swagger
in your browser to interact with the API using Swagger UI.
As a candidate for the Senior C# Developer position, you are expected to expand upon the base project with the following implementations:
- Enhance Input Validation: Ensure all incoming data via API endpoints meet predefined formats and constraints. Implement robust validation logic to prevent invalid data submissions.
- Dependency Injection (DI): Utilize DI extensively to decouple the application's dependencies. Enhance the current setup by refining service registrations and their usages throughout the application.
- Repository Pattern: Implement the Repository Pattern to abstract data access logic into reusable classes. This should help isolate the data layer, making the system easier to maintain and test.
- Unit of Work: Incorporate the Unit of Work pattern to manage transactional operations. This ensures that operations involving multiple repositories are done within a single transaction context.a
- Implement DELETE Functionality: Add a DELETE endpoint to allow users to remove listings from the memory. Ensure that this operation adheres to RESTful standards and includes appropriate validation and error handling to manage the integrity of the database.
- Containerize the Application: Dockerize the application to ensure it can run in a containerized environment. This includes creating a
Dockerfile
and possibly adocker-compose.yml
if necessary, to define how the application should be built and run in Docker.
- Code Quality: Write clean, scalable, and readable code that adheres to common C# coding standards.
- Testing: Include unit tests for new features to ensure reliability and help prevent future regressions.
- Documentation: Update documentation and comments as necessary to keep them relevant to the code changes.