Add project files.

This commit is contained in:
2022-10-06 16:53:07 +03:00
parent 45fac5e086
commit 6f3acce7d4
38 changed files with 1051 additions and 0 deletions
@@ -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>();
}
}