MCPcopy Create free account
hub / github.com/TryCatchLearn/Overflow / QuestionDbContext

Class QuestionDbContext

QuestionService/Data/QuestionDbContext.cs:6–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace QuestionService.Data;
5
6public class QuestionDbContext(DbContextOptions options) : DbContext(options)
7{
8 public DbSet<Question> Questions { get; set; }
9 public DbSet<Tag> Tags { get; set; }
10 public DbSet<Answer> Answers { get; set; }
11
12 protected override void OnModelCreating(ModelBuilder modelBuilder)
13 {
14 base.OnModelCreating(modelBuilder);
15
16 modelBuilder.Entity<Tag>()
17 .HasData(
18 new Tag
19 {
20 Id = "aspire",
21 Name = "Aspire",
22 Slug = "aspire",
23 Description =
24 "A composable, opinionated stack for building distributed apps with .NET. Provides dashboard, diagnostics, and simplified service orchestration."
25 },
26 new Tag
27 {
28 Id = "keycloak",
29 Name = "Keycloak",
30 Slug = "keycloak",
31 Description =
32 "An open-source identity and access management solution for modern applications and services. Integrates easily with OAuth2, OIDC, and SSO."
33 },
34 new Tag
35 {
36 Id = "dotnet",
37 Name = ".NET",
38 Slug = "dotnet",
39 Description =
40 "A modern, cross-platform development platform for building cloud, web, mobile, desktop, and IoT apps using C# and F#."
41 },
42 new Tag
43 {
44 Id = "ef-core",
45 Name = "Entity Framework Core",
46 Slug = "ef-core",
47 Description =
48 "A modern object-database mapper (ORM) for .NET that supports LINQ, change tracking, and migrations for working with relational databases."
49 },
50 new Tag
51 {
52 Id = "wolverine",
53 Name = "Wolverine",
54 Slug = "wolverine",
55 Description =
56 "A high-performance messaging and command-handling framework for .NET with built-in support for Mediator, queues, retries, and durable messaging."
57 },
58 new Tag
59 {
60 Id = "postgresql",
61 Name = "PostgreSQL",
62 Slug = "postgresql",
63 Description =

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…