public async Task <IActionResult> Create(TaskWithAllCurrentPets toDoTask)
        {
            if (ModelState.IsValid)
            {
                TimeSpan defaultTime = new TimeSpan(1, 0, 0, 0);
                toDoTask.Task.ResetDay = DateTime.Today.Date - defaultTime;
                _repo.ToDoTask.CreateTask(toDoTask.Task);
                await _repo.Save();

                return(RedirectToAction("Index", "PetOwners"));
            }
            return(View(toDoTask));
        }
        // GET: ToDoTasks/Create
        public async Task <IActionResult> Create()
        {
            var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
            var owner  = await _repo.PetOwner.FindOwner(userId);

            var petIds = await _repo.PetOwnership.FindAllPets(owner.PetOwnerId);


            TaskWithAllCurrentPets task = new TaskWithAllCurrentPets()
            {
                Task           = new ToDoTask(),
                CurrentPets    = await FindOwnersPets(petIds),
                AllFrequencies = await _repo.Frequency.GetFrequencies()
            };

            return(View(task));
        }