예제 #1
0
    private void SeedTestHost()
    {
        var authRepo = appHost.Resolve <IUserAuthRepository>();

        if (authRepo.GetUserAuthByUserName("TestUser") == null)
        {
            authRepo.CreateUserAuth(new CustomUserAuth
            {
                UserName = "******",
                Email    = "*****@*****.**"
            }, "testuser");

            authRepo.CreateUserAuth(new CustomUserAuth
            {
                UserName = "******",
                Email    = "*****@*****.**",
                Roles    = { RoleNames.Admin }
            }, "testuser");
        }

        Seeds.SeedApp(appHost.Resolve <IDbConnectionFactory>());
    }
예제 #2
0
 private void SeedTestHost()
 {
     Seeds.SeedApp(appHost.Resolve <IDbConnectionFactory>());
 }