A .NET web application for book management built using ASP.NET MVC architecture and design patterns.
WebBooks is a comprehensive book management system developed with ASP.NET. The application implements various design patterns including Model-View-Controller (MVC), Repository Pattern, and Dependency Injection to create a maintainable and scalable codebase.
- Book Management: Add, edit, delete, and view book entries
- Category Organization: Organize books by categories and genres
- User Authentication: Secure login and registration system
- Role-based Authorization: Different access levels for users and administrators
- Search Functionality: Find books by title, author, ISBN, or other parameters
- Responsive UI: Bootstrap-based interface that works on multiple devices
-
Backend:
- ASP.NET Core MVC
- Entity Framework Core
- C#
- LINQ
-
Frontend:
- Razor Views
- Bootstrap
- JavaScript/jQuery
- CSS3
-
Database:
- SQL Server/SQL Server Express
-
Design Patterns:
- Repository Pattern
- Dependency Injection
- MVC Architecture
The solution follows a clean architecture approach:
WebBooks/
├── WebBooks/ # Main ASP.NET project
│ ├── Controllers/ # MVC Controllers
│ ├── Models/ # Domain models
│ ├── Views/ # Razor views
│ ├── Data/ # Database context and migrations
│ ├── Repositories/ # Repository implementation
│ ├── Services/ # Business logic services
│ └── wwwroot/ # Static files (CSS, JS, images)
│
├── WebBooks.Core/ # Core domain project
│ ├── Entities/ # Domain entities
│ ├── Interfaces/ # Repository interfaces
│ └── Services/ # Service interfaces
│
├── WebBooks.Infrastructure/ # Infrastructure concerns
│ ├── Data/ # Data access implementation
│ ├── Repositories/ # Repository implementations
│ └── Services/ # Service implementations
│
└── WebBooks.Tests/ # Unit and integration tests
- .NET 6.0 SDK or later
- SQL Server/SQL Server Express
- Visual Studio 2022 or Visual Studio Code
- Clone the repository:
git clone https://github.com/Antwa-sensei253/WebBooks.git
cd WebBooks- Restore dependencies:
dotnet restore-
Update the database connection string in
appsettings.json -
Apply database migrations:
dotnet ef database update- Run the application:
dotnet run --project WebBooksUpdate the appsettings.json file with your specific configurations:
- Database connection string
- Authentication settings
- Logging preferences
- Any custom application settings
-
Open the solution in Visual Studio or Visual Studio Code
-
For Visual Studio:
- Right-click on the WebBooks project
- Select "Set as Startup Project"
- Press F5 to start debugging
-
For Visual Studio Code:
- Open the WebBooks folder
- Use the .NET Core launch configuration
- Start debugging with F5
To create a new migration after model changes:
dotnet ef migrations add MigrationName
dotnet ef database updateRun the tests with:
dotnet test- Publish the application:
dotnet publish -c Release- Deploy to your preferred hosting platform:
- Azure App Service
- IIS on Windows Server
- Docker container
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Commit your changes:
git commit -m 'Add new feature' - Push to the branch:
git push origin feature/new-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
Project created and maintained by Antwa-sensei253
For questions or support, please open an issue on the GitHub repository.