Skip to content

About

This is a base app I created to interact with SQLite DataBase using .NET as my EF and C# for accessing and retrieving and migrating data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Base.App.NET (Vista)

A small .NET console app that models a training company's data with Entity Framework Core and SQLite. It shows how to define entities, set up a DbContext, create the schema with EF migrations and query the data.

What it does

On startup the app connects to a local SQLite database and prints:

  1. every training category (code and name)
  2. every trainer (ID and name)

Data model

Entity Fields Relationships
Category CategoryCode, CategoryName many-to-many with Trainer
Trainer TrainerId, Name, Location many categories, many sessions
TrainerCategory TrainerId, CategoryCode join table for trainers ↔ categories
Session SessionId, TrainerId, SessionDate, BookingReference (optional) belongs to a trainer

The schema and sample data (categories, trainers and their sessions) are seeded with HasData and created by the EF Core migration in Vista.app/Data/Migrations. The database file, vista.trainers.db, is stored in your Documents folder.

Tech stack

C# · .NET 8 · Entity Framework Core 8 · SQLite

Getting started

Requirements: .NET 8 SDK or newer

git clone https://github.com/fahad16jpeg/Base.App.NET.git
cd Base.App.NET

# Create the database from the migrations (one-time)
dotnet tool install --global dotnet-ef
dotnet ef database update --project Vista.app

# Run the app
dotnet run --project Vista.app

Project structure

Base.App.NET/
├── Vista.slnx
└── Vista.app/
    ├── Program.cs                  # Lists categories and trainers
    ├── Vista.app.csproj
    └── Data/
        ├── TrainersDbContext.cs    # DbContext + SQLite configuration
        ├── Category.cs
        ├── Trainer.cs
        ├── TrainerCategory.cs
        ├── Session.cs
        └── Migrations/             # EF Core migrations

Author

Muhammad Fahad · @fahad16jpeg

About

This is a base app I created to interact with SQLite DataBase using .NET as my EF and C# for accessing and retrieving and migrating data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages