public JsonResult GetEvents(DateTime start, DateTime end, string id)
        {
            var bookable = BookableBroker.GetBookableById(Guid.Parse(id));
            var events   = bookable.GetBookedSlots(start, end);

            var eventList = from e in events
                            select new
            {
                id     = e.Id,
                title  = e.AdditionalNotes,
                start  = e.Start.ToString("s"),
                end    = e.End.ToString("s"),
                allDay = false
            };

            var rows = eventList.ToArray();

            return(Json(rows, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                var bookable = new Bookable();
                bookable.BookingContact = new Contact();
                bookable.Name           = collection["Name"];
                var tagstring = collection["Tags"];
                bookable.Description                = collection["Description"];
                bookable.BookingContact.Name        = collection["ContactName"];
                bookable.BookingContact.PhoneNumber = collection["ContactPhoneNumber"];
                bookable.BookingContact.Email       = collection["ContactEmail"];

                bookable.Id = Guid.NewGuid();
                BookableBroker.Save(bookable);
                BookableSearcher.AddBookableToSearcher(bookable.Name, bookable.Tags, bookable.Id);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
        // GET: Bookable
        public ActionResult Index(string id)
        {
            var bookable = BookableBroker.GetBookableById(Guid.Parse(id));

            return(View(bookable));
        }