The ASP.NET Core solution (mws.api/mws.application/mws.domain/ mws.infrastructure) existed only as untracked working files. Adding it to version control, plus a .gitignore for build output and local tooling directories, so the CQRS/mediator refactor plan has a real git history to branch and diff against.
25 lines
970 B
C#
25 lines
970 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Mws.Domain.Documents;
|
|
using Mws.Domain.Projects;
|
|
using Mws.Domain.Roles;
|
|
using Mws.Domain.Tasks;
|
|
using Mws.Domain.Users;
|
|
|
|
namespace Mws.Infrastructure.Persistence;
|
|
|
|
public class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
|
|
{
|
|
public DbSet<User> Users => Set<User>();
|
|
public DbSet<Project> Projects => Set<Project>();
|
|
public DbSet<ProjectMember> ProjectMembers => Set<ProjectMember>();
|
|
public DbSet<ProjectMemberPermission> ProjectMemberPermissions => Set<ProjectMemberPermission>();
|
|
public DbSet<Document> Documents => Set<Document>();
|
|
public DbSet<TaskItem> Tasks => Set<TaskItem>();
|
|
public DbSet<Role> Roles => Set<Role>();
|
|
public DbSet<RolePermission> RolePermissions => Set<RolePermission>();
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
|
|
}
|
|
} |