private TrailMeetService CreateTrailMeetService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new TrailMeetService(userId);

            return(service);
        }
        private bool SetStarState(int trailMeetsId, bool newState)
        {
            // Create the service
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new TrailMeetService(userId);

            // Get the note
            var detail = service.GetTrailMeetById(trailMeetsId);

            // Create the NoteEdit model instance with the new star state
            var updateTrailMeets =
                new TrailMeetEdit
            {
                TrailMeetID    = detail.TrailMeetID,
                TrailTrackerID = detail.TrailTrackerID,
                TrailName      = detail.TrailName,
                OfTrailType    = detail.OfTrailType,
                MeetTime       = detail.MeetTime,
                MeetComments   = detail.MeetComments,
                JoinTrail      = newState
            };

            // Return a value indicating whether the update succeeded
            return(service.UpdateTrailMeet(updateTrailMeets));
        }
        // GET
        public ActionResult Create()
        {
            var userId           = Guid.Parse(User.Identity.GetUserId());
            var TrailMeetService = new TrailMeetService(userId);

            ViewBag.TrailTrackerID = new SelectList(TrailMeetService.GetTrails(), "TrailTrackerID", "TrailName");
            return(View());
        }
        // GET: TrailMeet
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new TrailMeetService(userId);
            var model   = service.GetTrailMeets();

            return(View(model));
        }