public async Task <IActionResult> Create(HourPointConfigurationsModel hourPointConfigurationsModel) { try { TimeNotesUser identityUser = await _userManager.GetUserAsync(User); HourPointConfigurations hourPointConfigurations = new HourPointConfigurations(hourPointConfigurationsModel.WorkDays, hourPointConfigurationsModel.BankOfHours, hourPointConfigurationsModel.OfficeHour, hourPointConfigurationsModel.LunchTime, hourPointConfigurationsModel.StartWorkTime, hourPointConfigurationsModel.ToleranceTime, Guid.Parse(identityUser.Id), hourPointConfigurationsModel.HourValue); _hourPointConfigurationsRepository.AddHourPointConfiguration(hourPointConfigurations); await _hourPointConfigurationsRepository.Commit(); await EnsurePasscode(hourPointConfigurationsModel, identityUser); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }