예제 #1
0
        public async Task <ActionResult> GetEventsByVenue(int venueId)
        {
            var list = await _eventService.GetEventManagerEventsAsync(venueId, User.Identity.GetUserId <int>());

            return(Json(new
            {
                events = list.Select(x => new
                {
                    x.Id,
                    Display = x.Title + " (" + x.Date.ToShortDateString() + ", " + x.Date.ToShortTimeString() + ")"
                }).ToList()
            }, JsonRequestBehavior.AllowGet));
        }