NookPost-Backend
Loading...
Searching...
No Matches
NookpostBackend.Data.DatabaseHandle Class Reference

Create a Context for the API. More...

Inheritance diagram for NookpostBackend.Data.DatabaseHandle:
Collaboration diagram for NookpostBackend.Data.DatabaseHandle:

Public Member Functions

 DatabaseHandle (DbContextOptions< DatabaseHandle > Options)
 Set the DBPath to the ./database.db.
 

Protected Member Functions

override void OnModelCreating (ModelBuilder modelBuilder)
 Initialization Method for the Database Handle. Initializes the DB with sample data in case the application is running in Dev mode.
 

Properties

DbSet< UserUsers [get, set]
 A table to save UserSecrets.
 
DbSet< UserSettingsUserSettings [get, set]
 Set of UserSettings.
 
DbSet< CategoryCategories [get, set]
 Set of categories avaiable.
 
DbSet< PostPosts [get, set]
 Set of Posts.
 

Detailed Description

Create a Context for the API.

Constructor & Destructor Documentation

◆ DatabaseHandle()

NookpostBackend.Data.DatabaseHandle.DatabaseHandle ( DbContextOptions< DatabaseHandle > Options)
inline

Set the DBPath to the ./database.db.

Member Function Documentation

◆ OnModelCreating()

override void NookpostBackend.Data.DatabaseHandle.OnModelCreating ( ModelBuilder modelBuilder)
inlineprotected

Initialization Method for the Database Handle. Initializes the DB with sample data in case the application is running in Dev mode.

Property Documentation

◆ Categories

DbSet<Category> NookpostBackend.Data.DatabaseHandle.Categories
getset

Set of categories avaiable.

◆ Posts

DbSet<Post> NookpostBackend.Data.DatabaseHandle.Posts
getset

Set of Posts.

◆ Users

DbSet<User> NookpostBackend.Data.DatabaseHandle.Users
getset

A table to save UserSecrets.

◆ UserSettings

DbSet<UserSettings> NookpostBackend.Data.DatabaseHandle.UserSettings
getset

Set of UserSettings.


The documentation for this class was generated from the following file: