Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/changerd/booklibdesk
WPF Application sample
https://github.com/changerd/booklibdesk
cshar postgres wpf
Last synced: 25 days ago
JSON representation
WPF Application sample
- Host: GitHub
- URL: https://github.com/changerd/booklibdesk
- Owner: changerd
- Created: 2024-12-29T18:42:09.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-12-29T18:48:09.000Z (about 2 months ago)
- Last Synced: 2025-01-21T17:15:25.830Z (25 days ago)
- Topics: cshar, postgres, wpf
- Language: C#
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BooklibDesk
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.
## Features
- 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.## Technologies Used
- **WPF (Windows Presentation Foundation)** for the user interface.
- **Entity Framework Core** for database interaction.
- **PostgreSQL** as the database.
- **MVVM Pattern** for application architecture.## Requirements
- .NET 6 SDK or later
- PostgreSQL database server (running in Docker or locally)
- Visual Studio 2022 or another compatible IDE## Getting Started
### Clone the Repository
```bash
git clone https://github.com/yourusername/BooklibDesk.git
cd BooklibDesk
```### Set Up the Database
1. Pull the official PostgreSQL Docker image:
```bash
docker pull postgres
```
2. Run the PostgreSQL container:
```bash
docker run -d --name postgres-database -e POSTGRES_PASSWORD=123 -p 5432:5432 postgres:latest
```
3. Create SQL table:
```sql
CREATE DATABASE booklib;CREATE TABLE Books (
Id SERIAL PRIMARY KEY,
Title VARCHAR(255) NOT NULL,
Author VARCHAR(255) NOT NULL,
Year INT
);
```### Build and Run the Application
1. Open the solution in Visual Studio.
2. Restore NuGet packages and build the solution.
3. Run the application.## Project Structure
- **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`.