Commit bf8601c1 authored by Andres Käver's avatar Andres Käver
Browse files

indexes

parent 6023333a
......@@ -40,6 +40,15 @@ namespace DAL
modelBuilder.Entity<ContactType>()
.HasIndex(i => i.ContactTypeValue).IsUnique();
modelBuilder.Entity<Person>()
.HasIndex(p => p.FirstName);
modelBuilder.Entity<Person>()
.HasIndex(p => p.LastName);
modelBuilder.Entity<Person>()
.HasIndex(p => new {p.FirstName, p.LastName}).IsUnique();
// remove Cascade delete from all the entities <- this has to be at the end
foreach (var mutableForeignKey in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment