示例#1
0
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            UtcDateTimeValueConverter.Apply(modelBuilder);

            modelBuilder.Entity <MessageRelay>()
            .HasOne(r => r.Message)
            .WithMany(x => x.Relays)
            .HasForeignKey(x => x.MessageId)
            .IsRequired();

            base.OnModelCreating(modelBuilder);
        }
示例#2
0
 protected override void OnModelCreating(ModelBuilder modelBuilder)
 {
     UtcDateTimeValueConverter.Apply(modelBuilder);
     base.OnModelCreating(modelBuilder);
 }