Exemplo n.º 1
0
        public static void SeedUsers(this UserManager <ApplicationUser> userManager, IModelExtractionService <List <UserDataModel> > extractionService)
        {
            var model = extractionService.ExctractModelFromFile();

            model.ForEach(u => {
                userManager.CreateAsync(new ApplicationUser {
                    Login    = u.Login,
                    UserName = u.Name
                }, u.Password);
            });
        }
Exemplo n.º 2
0
 public HomeController(ILogger <HomeController> logger,
                       IModelExtractionService <List <UserDetailsModel> > modelExctractionService)
 {
     _logger = logger;
     _modelExctractionService = modelExctractionService;
 }