Giter Site home page Giter Site logo

avalonia-samples's Introduction

avalonia-white-purple Avalonia projects and test different functions.

These projects were developed as part of the learning process for Avalonia and PostgreSQL.

Projects

  • CRUD: This project focuses on basic CRUD (Create, Read, Update, Delete) operations using Avalonia and PostgreSQL.
  • ChitChat: ChitChat is a project showcasing chat functionality developed with Avalonia and PostgreSQL. This system is designed to support the transmission of messages between individual employees and groups of employees.
  • Hospital: Hospital provides a comprehensive view of hospital wards, allowing you to efficiently manage patient occupancy. With our intuitive drag-and-drop feature, you can seamlessly move patients between words (drag&drop).
  • Statistic: This project aims to implement various charts using Live Charts 2, a powerful charting library for .NET applications.
  • TestApi: This API is designed for CRUD operations. Data transmission occurs via the request body.
  • Usb device driver: using System.IO.Ports in Avalonia. Feel free to explore each project for more details and contributions.

To connect our PostgreSQL database to an Avalonia project

We need to install the following packages in the Avalonia project:

Microsoft.EntityFrameworkCore.Design

To install Microsoft.EntityFrameworkCore.Design package using .NET CLI, run the following command:

dotnet add package Microsoft.EntityFrameworkCore.Design --version 9.0.0-preview.2.24128.4

To install Microsoft.EntityFrameworkCore.Design package using Package Manager, run the following command:

NuGet\Install-Package Microsoft.EntityFrameworkCore.Design -Version 9.0.0-preview.2.24128.4
Npgsql.EntityFrameworkCore.PostgreSQL

To install Npgsql.EntityFrameworkCore.PostgreSQL package using .NET CLI, run the following command:

dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 9.0.0-preview.1

To install Npgsql.EntityFrameworkCore.PostgreSQL package using Package Manager, run the following command:

NuGet\Install-Package Npgsql.EntityFrameworkCore.PostgreSQL -Version 9.0.0-preview.1

This command is used for reverse engineering PostgreSQL databases and automatically generating model classes based on the existing database schema.

dotnet ef dbcontext scaffold "Host=0.0.0.0;Username=postgres;Password=password;Database=DataBaseName" Npgsql.EntityFrameworkCore.PostgreSQL --output-dir <Folder where you want to generate classes>

To overwrite existing classes, use the --force option.

dotnet ef dbcontext scaffold "Host=0.0.0.0;Username=postgres;Password=password;Database=DataBaseName" Npgsql.EntityFrameworkCore.PostgreSQL --output-dir <Folder where you want to generate classes> --force
dotnet tool install --global dotnet-ef --version 7.*

avalonia-samples's People

Contributors

c3n9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.