Add VehiclePreviousLog

This commit is contained in:
2012-12-05 15:10:14 -05:00
parent ab16763c01
commit f00c5295e1
6 changed files with 83 additions and 0 deletions
+4
View File
@@ -12,6 +12,10 @@ namespace MileageTraker.Web.Models
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
modelBuilder.Entity<Log>()
.HasOptional(l => l.VehiclePreviousLog)
.WithMany()
.HasForeignKey(l => l.VehiclePreviousLogId);
}
}
}