public async Task<ActionResult> AddSchedule([ModelBinder(typeof(DayOfWeekModelBinder))] DayOfWeek days)
        {
            var submitModel = new ScheduleSubmitModel{ Days = days };

            if (!this.TryUpdateModel(submitModel
                , new[]{"CheckForRain", "DeviceId", "Duration", "Hours", "Minutes", "Recurrence", "StartDate"}
                )
                )
            {
                return this.View("Add", submitModel);
            }

            var schedule = new Schedule
                               {
                                   CheckForRain = submitModel.CheckForRain,
                                   Days = submitModel.Recurrence ? submitModel.Days : null,
                                   DeviceId = submitModel.DeviceId,
                                   Duration = submitModel.Duration,
                                   Offset = new TimeSpan(submitModel.Hours, submitModel.Minutes, 0),
                                   Recurrence = submitModel.Recurrence,
                                   StartDate = submitModel.Recurrence ? null : submitModel.StartDate
                               };
            await this.scheduleCommandManager.AddScheduleAsync(this.HttpContext.User.Identity.GetUserId(), schedule);
            return this.RedirectToAction("Index", new { Id = schedule.Id, DeviceId = submitModel.DeviceId });
        }
        public ActionResult Add(string deviceId)
        {
            var model = new ScheduleSubmitModel { DeviceId = deviceId };

            return this.View(model);
        }