Hello and thanks for reading this.
I have the code below:
public JsonResult Events()
{
List<Raid> raids = db.Raids.ToList();
foreach (var item in raids)
{
}
var rows = new object[] {
new { title="Event1", start= "2015-07-04" },
new { title="Event2", start= "2015-07-05" }
};
return Json(rows, JsonRequestBehavior.AllowGet);
}
I would like the part below to be dynamic/Create by the foreach loop.
var rows = new object[] {
new { title="Event1", start= "2015-07-04" },
new { title="Event2", start= "2015-07-05" }
};
Can someone tell me how I can do that or any other way of doing it. Kinda running low on ideas about how to solve it.
It is used to my Calendar :
$('#calendar').fullCalendar({
defaultDate: output, //'2015-02-12',
editable: false,
eventLimit: true, // allow "more" link when too many events
events: '@Url.Content("~/Members/Events")'
});