more friendly

This commit is contained in:
Paul Schneider 2017-09-24 23:42:41 +02:00
commit 254f752abb
11 changed files with 762 additions and 263 deletions

View file

@ -54,7 +54,7 @@ namespace Yavsc.Models
builder.Entity<HyperLink>().HasKey(l=>new { l.HRef, l.Method });
builder.Entity<Period>().HasKey(l=>new { l.Start, l.End });
builder.Entity<Models.Cratie.Option>().HasKey( o => new { o.Code, o.CodeScrutin });
builder.Entity<Notification>().Property(n=> n.icon).HasDefaultValue("exclam");
foreach (var et in builder.Model.GetEntityTypes()) {
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
et.FindProperty("DateCreated").IsReadOnlyAfterSave = true;