19 lines
531 B
C#
19 lines
531 B
C#
{3172b5b6932220a08cfd0c990266c4c27e980b8f true 531 ManarahContext.cs 0xc002b74ee0}
using Manarah.Domain;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Manarah.App.Data
|
|
{
|
|
public class ManarahContext:DbContext
|
|
{
|
|
public ManarahContext(DbContextOptions<ManarahContext> options) : base(options) { }
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
|
|
modelBuilder.Entity<Server>().ToTable(nameof(Server));
|
|
modelBuilder.Entity<Server>().HasKey(model => model.IPAddress);
|
|
}
|
|
public DbSet<Server> Servers { get; set; }
|
|
}
|
|
}
|