Files
SomniaGuestLog/src/Somnia.GuestLog/Infrastructure/GuestLogContext.cs
T
Daniel-Garmig 6dc2d2426b GuestLog - StayEntry - Initial Implementation
- Added new entity "StayEntry" to log stays of guests.
- Added pages for StayEntry management (List and creation).
- New DataList for PaymentMethods.
- Other general changes and improvements.
2026-08-15 19:33:32 +02:00

29 lines
863 B
C#

using Microsoft.EntityFrameworkCore;
using Somnia.GuestLog.Infrastructure.EntityConfigs;
using Somnia.GuestLog.Models.Entities;
namespace Somnia.GuestLog.Infrastructure;
public partial class GuestLogContext : DbContext
{
public GuestLogContext(DbContextOptions<GuestLogContext> options)
: base(options)
{ }
public DbSet<GuestDocument> GuestDocuments { get; set; }
public DbSet<StayEntry> StayEntries { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfiguration<GuestDocument>(new GuestDocumentEntityConfig());
modelBuilder.ApplyConfiguration<StayEntry>(new StayEntryEntityConfig());
OnModelCreatingPartial(modelBuilder);
base.OnModelCreating(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}