string username = User.Identity.Name; var data = from n in EventData.Entities where n.Username == username where n.Type == (int)EventType.常用事件 select new FullCalendar() { id = n.Id, title = n.Title, start = n.StartTime.ToString(), end = n.EndTime.ToString(), url = n.Url }; return Json(data.ToList());
菜鸟问题,求大神帮忙
start = n.StartTime.ToString(),
end = n.EndTime.ToString(),
这里不应该Tostring()
以前用过,linq里面不支持类型转换,在外面转换好 再写在里面