mirror of
https://github.com/farcasclaudiu/PracticeCalendar.git
synced 2026-06-22 09:01:18 +03:00
Add project files.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user