private void SetCollections(GalleryContext context) { context.GetSet <Collection>().AddOrUpdate(C => C.Id, new Collection { Id = 1, Name = "Paisagismo", Date = new DateTime(2017, 02, 28) }, new Collection { Id = 2, Name = "Bodegon", Date = new DateTime(2017, 02, 28) }); }