Library App is a console-based library management system implemented in C# using .NET 8.0. It allows users to manage patrons, books, and loans through a simple console interface. The application uses JSON files for data storage and supports operations such as searching for patrons, viewing patron details, managing loans, and renewing memberships.
AccelerateDevGitHubCopilot.slnREADME.mdsrcLibrary.ApplicationCore/Entities/src/Library.ApplicationCore/Entities/Author.cssrc/Library.ApplicationCore/Entities/Book.cssrc/Library.ApplicationCore/Entities/BookItem.cssrc/Library.ApplicationCore/Entities/Loan.cssrc/Library.ApplicationCore/Entities/Patron.cs
Enums/src/Library.ApplicationCore/Enums/EnumHelper.cssrc/Library.ApplicationCore/Enums/LoanExtensionStatus.cssrc/Library.ApplicationCore/Enums/LoanReturnStatus.cssrc/Library.ApplicationCore/Enums/MembershipRenewalStatus.cs
Interfaces/src/Library.ApplicationCore/Interfaces/ILoanRepository.cssrc/Library.ApplicationCore/Interfaces/ILoanService.cssrc/Library.ApplicationCore/Interfaces/IPatronRepository.cssrc/Library.ApplicationCore/Interfaces/IPatronService.cs
Services/src/Library.ApplicationCore/Services/LoanService.cssrc/Library.ApplicationCore/Services/PatronService.cs
src/Library.ApplicationCore/Library.ApplicationCore.csproj
Library.Console/src/Library.Console/appSettings.jsonsrc/Library.Console/CommonActions.cssrc/Library.Console/ConsoleApp.cssrc/Library.Console/ConsoleState.csJson/src/Library.Console/Json/Authors.jsonsrc/Library.Console/Json/Books.jsonsrc/Library.Console/Json/BookItems.jsonsrc/Library.Console/Json/Loans.jsonsrc/Library.Console/Json/Patrons.json
src/Library.Console/Library.Console.csprojsrc/Library.Console/Program.cs
Library.Infrastructure/Data/src/Library.Infrastructure/Data/JsonData.cssrc/Library.Infrastructure/Data/JsonLoanRepository.cssrc/Library.Infrastructure/Data/JsonPatronRepository.cs
src/Library.Infrastructure/Library.Infrastructure.csproj
testsUnitTests/ApplicationCore/LoanService/tests/UnitTests/ApplicationCore/LoanService/ExtendLoan.cstests/UnitTests/ApplicationCore/LoanService/ReturnLoan.cs
PatronService/tests/UnitTests/ApplicationCore/PatronService/RenewMembership.cs
tests/UnitTests/LoanFactory.cstests/UnitTests/PatronFactory.cstests/UnitTests/UnitTests.csproj
- Entities
Author: Represents an author in the library.Book: Represents a book in the library.BookItem: Represents a physical copy of a book.Loan: Represents a loan of a book item to a patron.Patron: Represents a library patron.
- Enums
EnumHelper: Provides helper methods for enums.LoanExtensionStatus: Represents the status of a loan extension.LoanReturnStatus: Represents the status of a loan return.MembershipRenewalStatus: Represents the status of a membership renewal.
- Interfaces
ILoanRepository: Interface for loan repository operations.ILoanService: Interface for loan service operations.IPatronRepository: Interface for patron repository operations.IPatronService: Interface for patron service operations.
- Services
LoanService: Implements loan-related business logic.PatronService: Implements patron-related business logic.
CommonActions: Defines common actions for the console application.ConsoleApp: Manages the console-based user interface.ConsoleState: Represents the different states of the console application.Program: Configures and starts the console application.
- Data
JsonData: Manages loading and saving data from/to JSON files.JsonLoanRepository: Implements loan repository operations using JSON data.JsonPatronRepository: Implements patron repository operations using JSON data.
- Clone the repository:
git clone https://github.com/yourusername/library-app.git cd library-app - Build the solution:
dotnet build
- Run the console application:
dotnet run --project src/Library.Console/Library.Console.csproj
- Follow the on-screen instructions to interact with the library management system.
This project is licensed under the MIT License - see the LICENSE file for details.