public static void Run(MyAppDbContext db) { db.Address.AddOrUpdate(s => s.Id, new Address { Id = 1, City = "Edinburgh", Country = "U.K.", Line1 = "Line1 x1", Line2 = "Line2 x1", Line3 = "Line3 x1", PostCode = "EH88JU", Version = TimestampHelper.Generate() } , new Address { Id = 2, City = "Aberdeen", Country = "U.K.", Line1 = "Line1 x2", Line2 = "Line2 x2", Line3 = "Line3 x2", PostCode = "EH37JU", Version = TimestampHelper.Generate() } ); db.SaveChanges(); }
public static void Run(MyAppDbContext db) { db.Contact.AddOrUpdate(s => s.Id, new Contact { Id = 1, Email = "*****@*****.**", FirstName = "firstName1", LastName = "lastName1", Title = "title1", Version = TimestampHelper.Generate() }, new Contact { Id = 2, Email = "*****@*****.**", FirstName = "firstName2", LastName = "lastName2", Title = "title2", Version = TimestampHelper.Generate() } ); db.SaveChanges(); }
public Address() { Version = TimestampHelper.Generate(); }
public Contact() { Version = TimestampHelper.Generate(); }
public void When_generates_random_time_stamp_checks_its_length() { var timeStamp = TimestampHelper.Generate(); Assert.AreEqual(timeStamp.Length, 4); }