Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.50 KB | None | 0 0
  1. protected override void Seed(Models.DataModels.VenContext context)
  2.         {
  3.             context.Persons.AddOrUpdate(
  4.                 p => p.PersonId,
  5.                 new Person("Jorja Tal", "Wolf") {PersonId = 1},
  6.                 new Person("Gryndil Jalan", "Serpent") {PersonId = 2},
  7.                 new Person("Tzao Tal", "Wolf") {PersonId = 3});
  8.  
  9.             context.SaveChanges();
  10.  
  11.             context.Aspects.AddOrUpdate(
  12.                 a => a.AspectId,
  13.                 new Aspect
  14.                 {
  15.                     AspectId = 1,
  16.                     Name = "Cataloger of Artifacts",
  17.                     Invoke = "I am excellent at recognizing artifacts from the sorcerer-kings.",
  18.                     Tag = "My collection is always on my mind and any threat to it angers me or mention of it distracts me.",
  19.                     Compel = "I want to collect artifacts and will ditch other plans to do so."
  20.                 },
  21.                 new Aspect
  22.                 {
  23.                     AspectId = 2,
  24.                     Name = "Have we met?",
  25.                     Invoke = "It's easy to get around when you never go out. Gain three bonus dice when trying to hide your identity from someone.",
  26.                     Tag = "You are uncomfortable in “civilized” situations and when you really should know someone's name.",
  27.                     Compel = "You get uncomfortable in large groupings. You often find that you need to \"go get some air.\""
  28.                 },
  29.                 new Aspect
  30.                 {
  31.                     AspectId = 3,
  32.                     Name = "Adrente (Wolf)",
  33.                     Invoke = "Add Two bonus dice to any risk involving direct and physical conflict.",
  34.                     Tag = "None",
  35.                     Compel = "You can be compelled to defend your honor."
  36.                 }
  37.             );
  38.  
  39.             context.SaveChanges();
  40.  
  41.             context.Families.AddOrUpdate(
  42.                 f => f.FamilyId,
  43.                 new Family
  44.                 {
  45.                     FamilyId = 1,
  46.                     Name = "Tal",
  47.                     Standing = "Baron",
  48.                     Father = context.Persons.Find(1),
  49.                     Mother = context.Persons.Find(2),
  50.                     Children = new List<Person> {context.Persons.Find(3)}
  51.                 }
  52.             );
  53.  
  54.             context.SaveChanges();
  55.  
  56.             context.Devotions.AddOrUpdate(
  57.                 d => d.DevotionId,
  58.                 new Devotion {Name = "Ashalim Avendi", Rank = 2},
  59.                 new Devotion {Name = "Falvren Dyr", Rank = 1}
  60.             );
  61.  
  62.             context.SaveChanges();
  63.            
  64.             context.Ven.AddOrUpdate(
  65.                 ven => ven.Name,
  66.                 new Ven {
  67.                     VenId = 5,
  68.                     Name = "Nallia Tal",
  69.                     Attributes = new Attributes(0, 2, 3, 2, 4, 4),
  70.                     House = "Wolf",
  71.                     Family = context.Families.Find(1),
  72.                     Devotions = new List<Devotion> { context.Devotions.Find(1), context.Devotions.Find(2) },
  73.                     StylePoints = 3,
  74.                     Aspects = new List<Aspect> { context.Aspects.Find(1), context.Aspects.Find(2), context.Aspects.Find(3) },
  75.                     Contacts = new List<Contact> {new Contact {Name = "Davan"}},
  76.                     Items = new List<Item> {
  77.                         new Item {Name = "Brooch of Swiftness", Rank = 1},
  78.                         new Item {Name = "Subtle Dagger", Rank = 1}},
  79.                     Rituals = new List<Ritual> {new Ritual {Name ="The Quill"}, new Ritual { Name = "The Rose"}},
  80.                     Domain = new List<Location>
  81.                     {
  82.                         new Location{ Name = "Varault", Type = "Castle"},
  83.                         new Location{ Name = "Varon", Type = "Village"},
  84.                         new Location{ Name = "Hollow Hill", Type = "Farm"},
  85.                         new Location{ Name = "Ansfeld", Type = "Ruin", Rank = 2},
  86.                         new Location{ Name = "The Mire", Type = "Swamp"}
  87.                     },
  88.                     Vassals = new List<Vassal>
  89.                     {
  90.                         new Vassal{ Name = "Staff", Rank = 1},
  91.                         new Vassal{ Name = "Apothecary", Rank = 1},
  92.                         new Vassal{ Name = "Roadmen", Rank = 2},
  93.                         new Vassal{ Name = "Maid", Rank = 1}
  94.                     }
  95.                 }
  96.             );
  97.  
  98.             context.SaveChanges();
  99.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement