SHA256
- 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.
29 lines
863 B
C#
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);
|
|
|
|
}
|