This repository contains a project designed for integration testing using SQL Server as the backend database.
LibroConsoleAPI is a console application developed with .NET Core, enabling users to manage a library of books through CRUD operations performed on a SQL Server database.
This project demonstrates core software development principles like integration testing, database management, and console-based application architecture.
- Create: Add books to the database.
- Read: Retrieve details of books from the database.
- Update: Modify existing book information.
- Delete: Remove books from the database.
- LibroConsoleAPI: The main project that serves as the application’s entry point.
- Business: Implements the core functionality of the application.
- Common: Contains validation rules and constraints for data.
- Data: Defines models representing the data managed by the application.
- DataAccess: Acts as a bridge between business logic and the data layer.
- .NET Core: The primary framework used for building the console application.
- SQL Server: The database management system used for storing book data.
- Entity Framework Core: An ORM (Object-Relational Mapper) for database interactions.
- xUnit: A unit-testing framework for .NET applications.
- nUnit: A unit-testing framework for .NET applications.
You can also run the SQL Server using a Docker image, which simplifies the setup and ensures consistency across different environments. To set up SQL Server with Docker, follow these steps:
-
Pull the SQL Server Docker image:
docker pull mcr.microsoft.com/mssql/server
-
Run the Docker container:
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Your_password123' -p 1433:1433 --name sqlserver -d mcr.microsoft.com/mssql/server
-
Connect to the SQL Server:
- Use the connection string:
Server=localhost,1433;Database=YourDatabase;User Id=sa;Password=Your_password123; - Replace
YourDatabasewith the name of your database.
- Use the connection string:
For more information on using Docker with SQL Server, you can refer to the official Docker documentation and the SQL Server on Docker guide.
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, please open an issue in the repository.