public async static Task Seed(IAppUserService appUserService, IAppUserRoleService appUserRoleService, IAppRoleService appRoleService) { var adminRole = await appRoleService.FindByName("Admin"); var memberRole = await appRoleService.FindByName("Member"); if (adminRole == null) { await appRoleService.InsertAsync(new AppRole { Name = RoleInfo.Admin }); } if (memberRole == null) { await appRoleService.InsertAsync(new AppRole { Name = RoleInfo.Member }); } var adminUser = await appUserService.FindByUserNameAsync("pcparticle"); if (adminUser == null) { await appUserService.InsertAsync(new AppUser { FullName = "Erol Aksoy", Password = "******", UserName = "******" }); var admin = await appUserService.FindByUserNameAsync("pcparticle"); var role = await appRoleService.FindByName("Admin"); await appUserRoleService.InsertAsync(new AppUserRole { AppRoleId = role.Id, AppUserId = admin.Id }); } }