public async Task OnGet()
        {
            foreach (var ability in Abilities)
            {
                await understandMySelfRepository.SaveAbilityAsync(ability);
            }

            foreach (var skill in Skills)
            {
                await understandMySelfRepository.SaveSkillAsync(skill);
            }

            foreach (var taskItem in TaskItems)
            {
                await understandMySelfRepository.SaveTaskItemAsync(taskItem);
            }

            foreach (var jobProfile in JobProfiles)
            {
                await understandMySelfRepository.SaveJobProfileAsync(jobProfile);
            }

            foreach (var stepDetail in StepDetails)
            {
                await understandMySelfRepository.SaveStepDetailsAsync(stepDetail);
            }

            Task.WaitAll();

            LoadText = "Data Loaded Succesfully";
        }
Esempio n. 2
0
        public async Task <IActionResult> OnPostAsync()
        {
            foreach (var skill in SkillList.Split(','))
            {
                await understandMySelfRepository.SaveSkillAsync(new Skill { Description = skill });
            }

            foreach (var ability in AbilityList.Split(','))
            {
                await understandMySelfRepository.SaveAbilityAsync(new Ability { Description = ability });
            }

            foreach (var task in TaskList.Split(','))
            {
                await understandMySelfRepository.SaveTaskItemAsync(new TaskItem { Description = task });
            }

            return(RedirectToPage("/manageframeworkItems"));
        }