using Modell;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Datenzugriff
{
    public class EFKontext : DbContext
    {
     public DbSet<Veranstaltung> VeranstaltungsSet { get; set; }
     public DbSet<Teilnehmer> TeilnehmerSet { get; set; }

     public EFKontext()
      : base("name=Anmeldedatenbank")
     {

     }

     protected override void OnModelCreating(DbModelBuilder modelBuilder)
     {
      base.OnModelCreating(modelBuilder);
      modelBuilder.Conventions.Remove<System.Data.Entity.ModelConfiguration.Conventions.PluralizingTableNameConvention>();
      modelBuilder.Conventions.Remove<System.Data.Entity.ModelConfiguration.Conventions.PluralizingEntitySetNameConvention>();
     }
    }
}
