Class ApplicationDbContext
- Namespace
- Builvero.Infrastructure.Data
- Assembly
- Builvero.Infrastructure.dll
Entity Framework Core database context for the Builvero application.
public class ApplicationDbContext : DbContext, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IDisposable, IAsyncDisposable
- Inheritance
-
ApplicationDbContext
- Implements
- Inherited Members
Remarks
This context manages all database entities and their relationships. It includes configuration for entity relationships, indexes, and value conversions for enums stored as strings.
The context is configured via dependency injection and uses the configured database provider (typically PostgreSQL in production, SQLite or in-memory for testing).
Constructors
ApplicationDbContext(DbContextOptions<ApplicationDbContext>)
Initializes a new instance of the ApplicationDbContext class.
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
Parameters
optionsDbContextOptions<ApplicationDbContext>The database context options configured via dependency injection.
Properties
BlogPosts
Gets or sets the database set for blog posts.
public DbSet<BlogPost> BlogPosts { get; set; }
Property Value
BuilderTags
Gets or sets the database set for builder tags (skills/categories).
public DbSet<BuilderTag> BuilderTags { get; set; }
Property Value
- DbSet<BuilderTag>
- Entity Framework Core database context for the Builvero application.
Educations
Gets or sets the database set for user education records.
public DbSet<Education> Educations { get; set; }
Property Value
EmailVerificationCodes
Gets or sets the database set for email verification codes.
public DbSet<EmailVerificationCode> EmailVerificationCodes { get; set; }
Property Value
- DbSet<EmailVerificationCode>
- Entity Framework Core database context for the Builvero application.
Experiences
Gets or sets the database set for user experience records.
public DbSet<Experience> Experiences { get; set; }
Property Value
- DbSet<Experience>
- Entity Framework Core database context for the Builvero application.
Invitations
Gets or sets the database set for user registration invitations.
public DbSet<Invitation> Invitations { get; set; }
Property Value
- DbSet<Invitation>
- Entity Framework Core database context for the Builvero application.
OAuthAccounts
Gets or sets the database set for OAuth account associations.
public DbSet<OAuthAccount> OAuthAccounts { get; set; }
Property Value
- DbSet<OAuthAccount>
- Entity Framework Core database context for the Builvero application.
OnboardingQuizAttempts
Gets or sets the database set for onboarding quiz attempts.
public DbSet<OnboardingQuizAttempt> OnboardingQuizAttempts { get; set; }
Property Value
- DbSet<OnboardingQuizAttempt>
- Entity Framework Core database context for the Builvero application.
ProjectBuilderTags
Gets or sets the database set for project-builder tag associations.
public DbSet<ProjectBuilderTag> ProjectBuilderTags { get; set; }
Property Value
- DbSet<ProjectBuilderTag>
- Entity Framework Core database context for the Builvero application.
ProjectForumMessages
Gets or sets the database set for project forum messages.
public DbSet<ProjectForumMessage> ProjectForumMessages { get; set; }
Property Value
- DbSet<ProjectForumMessage>
- Entity Framework Core database context for the Builvero application.
ProjectForumNotificationSettings
Gets or sets the database set for project forum notification settings.
public DbSet<ProjectForumNotificationSettings> ProjectForumNotificationSettings { get; set; }
Property Value
- DbSet<ProjectForumNotificationSettings>
- Entity Framework Core database context for the Builvero application.
ProjectForumTopicSubscriptions
Gets or sets the database set for project forum topic subscriptions.
public DbSet<ProjectForumTopicSubscription> ProjectForumTopicSubscriptions { get; set; }
Property Value
- DbSet<ProjectForumTopicSubscription>
- Entity Framework Core database context for the Builvero application.
ProjectForumTopics
Gets or sets the database set for project forum topics.
public DbSet<ProjectForumTopic> ProjectForumTopics { get; set; }
Property Value
- DbSet<ProjectForumTopic>
- Entity Framework Core database context for the Builvero application.
ProjectInvitations
Gets or sets the database set for project invitations.
public DbSet<ProjectInvitation> ProjectInvitations { get; set; }
Property Value
- DbSet<ProjectInvitation>
- Entity Framework Core database context for the Builvero application.
ProjectJoinRequests
Gets or sets the database set for project join requests.
public DbSet<ProjectJoinRequest> ProjectJoinRequests { get; set; }
Property Value
- DbSet<ProjectJoinRequest>
- Entity Framework Core database context for the Builvero application.
ProjectMemberships
Gets or sets the database set for project memberships.
public DbSet<ProjectMembership> ProjectMemberships { get; set; }
Property Value
- DbSet<ProjectMembership>
- Entity Framework Core database context for the Builvero application.
ProjectSkills
Gets or sets the database set for project-skill associations.
public DbSet<ProjectSkill> ProjectSkills { get; set; }
Property Value
- DbSet<ProjectSkill>
- Entity Framework Core database context for the Builvero application.
Projects
Gets or sets the database set for projects.
public DbSet<Project> Projects { get; set; }
Property Value
Skills
Gets or sets the database set for skills.
public DbSet<Skill> Skills { get; set; }
Property Value
UserBuilderTags
Gets or sets the database set for user-builder tag associations.
public DbSet<UserBuilderTag> UserBuilderTags { get; set; }
Property Value
- DbSet<UserBuilderTag>
- Entity Framework Core database context for the Builvero application.
UserNotifications
Gets or sets the database set for user notifications.
public DbSet<UserNotification> UserNotifications { get; set; }
Property Value
- DbSet<UserNotification>
- Entity Framework Core database context for the Builvero application.
UserProfiles
Gets or sets the database set for user profiles.
public DbSet<UserProfile> UserProfiles { get; set; }
Property Value
- DbSet<UserProfile>
- Entity Framework Core database context for the Builvero application.
UserSkills
Gets or sets the database set for user-skill associations.
public DbSet<UserSkill> UserSkills { get; set; }
Property Value
Users
Gets or sets the database set for user accounts.
public DbSet<User> Users { get; set; }
Property Value
VolunteerApplications
Gets or sets the database set for volunteer applications.
public DbSet<VolunteerApplication> VolunteerApplications { get; set; }
Property Value
- DbSet<VolunteerApplication>
- Entity Framework Core database context for the Builvero application.
VolunteerRoles
Gets or sets the database set for volunteer roles.
public DbSet<VolunteerRole> VolunteerRoles { get; set; }
Property Value
- DbSet<VolunteerRole>
- Entity Framework Core database context for the Builvero application.
Methods
OnModelCreating(ModelBuilder)
Configures the entity model relationships, indexes, and value conversions.
protected override void OnModelCreating(ModelBuilder modelBuilder)
Parameters
modelBuilderModelBuilderThe model builder instance used to configure entities.