public static void Initialize(CryptoDbContext context) { context.Database.EnsureCreated(); if (context.Users.FirstOrDefault(n => n.UserName == "phil") == null) { context.Users.Add(new User() { Role = "Administrator", UserName = "******", ArticleQueryProfile = null, CreatedAt = DateTime.Now.ToString(), Email = "", HashedPassword = "******", }); context.SaveChanges(); } if (context.Users.FirstOrDefault(n => n.UserName == "max") == null) { context.Users.Add(new User() { Role = "Administrator", UserName = "******", ArticleQueryProfile = null, CreatedAt = DateTime.Now.ToString(), Email = "", HashedPassword = "******", }); context.SaveChanges(); } if (context.Users.FirstOrDefault(n => n.UserName == "francisco") == null) { context.Users.Add(new User() { Role = "Administrator", UserName = "******", ArticleQueryProfile = null, CreatedAt = DateTime.Now.ToString(), Email = "", HashedPassword = "******", }); context.SaveChanges(); } if (context.Users.FirstOrDefault(n => n.UserName == "standardUser") == null) { context.Users.Add(new User() { Role = "StandardUser", UserName = "******", ArticleQueryProfile = null, CreatedAt = DateTime.Now.ToString(), Email = "", HashedPassword = "******", }); context.SaveChanges(); } }