Exemplo n.º 1
0
 public void AddData()
 {
     using (var db = new CoreMVCTestContext())
     {
         db.Database.EnsureCreated();
         var user = db.Users.FirstOrDefault();
         if (user == null)
         {
             user                 = new CoreMVCTestDB.Models.PublicModel.Users();
             user.UserName        = "******";
             user.Email           = "*****@*****.**";
             user.NormalizedEmail = "*****@*****.**";
             user.EmailConfirmed  = true;
             user.PasswordHash    = PassWordHelp.MD5Encrypt16("000000");
             db.Users.Add(user);
         }
         db.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public BackgroundManagementController(CoreMVCTestContext context)
 {
     _context = context;
 }