mirror of
https://github.com/farcasclaudiu/PracticeCalendar.git
synced 2026-06-22 05:01:15 +03:00
24 lines
724 B
C#
24 lines
724 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using PracticeCalendar.Domain.Entities;
|
|
using System.Reflection;
|
|
|
|
namespace PracticeCalendar.Infrastructure.Persistence
|
|
{
|
|
public class ApplicationDbContext : DbContext
|
|
{
|
|
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
|
|
: base(options)
|
|
{
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
|
|
}
|
|
|
|
public DbSet<Attendee> Atendees => Set<Attendee>();
|
|
public DbSet<PracticeEvent> PracticeEvents => Set<PracticeEvent>();
|
|
}
|
|
}
|