Ejemplo n.º 1
0
 public static void Initialize(PLFAppDbContext context)
 {
     context.Database.EnsureCreated();
     if (!context.Member.Any())
     {
         var member = new Member()
         {
             MobilePhone  = "13212345678",
             Password     = "******",
             NickName     = "张三",
             HeadImageUrl = ""
         };
         context.Member.Add(member);
         context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public int SaveChanges()
 {
     return(context.SaveChanges());
 }