BooklibDesk is a WPF desktop application designed to manage a library of books. It provides functionality to add, edit, delete, with data stored in a PostgreSQL database. The application is built using the MVVM (Model-View-ViewModel) architectural pattern.
- Add new books with title, author, and year of publication.
- Edit existing book records.
- Delete books from the library.
- View a list of books in a sortable and filterable table.
- Store and retrieve book data from a PostgreSQL database using Entity Framework Core.
- Input validation and feedback for successful/unsuccessful operations.
- WPF (Windows Presentation Foundation) for the user interface.
- Entity Framework Core for database interaction.
- PostgreSQL as the database.
- MVVM Pattern for application architecture.
- .NET 6 SDK or later
- PostgreSQL database server (running in Docker or locally)
- Visual Studio 2022 or another compatible IDE
git clone https://github.com/yourusername/BooklibDesk.git
cd BooklibDesk
- Pull the official PostgreSQL Docker image:
docker pull postgres
- Run the PostgreSQL container:
docker run -d --name postgres-database -e POSTGRES_PASSWORD=123 -p 5432:5432 postgres:latest
- Create SQL table:
CREATE DATABASE booklib;
CREATE TABLE Books (
Id SERIAL PRIMARY KEY,
Title VARCHAR(255) NOT NULL,
Author VARCHAR(255) NOT NULL,
Year INT
);
- Open the solution in Visual Studio.
- Restore NuGet packages and build the solution.
- Run the application.
- Models: Defines the
Book
entity. - Data: Contains the
ApplicationDbContext
for database interactions. - ViewModels: Implements the
MainViewModel
for binding data to the UI. - Views: Includes the XAML files for the application's UI.
- Utils: Contains utility classes like
RelayCommand
.