Developed very simple example following the online samples and downloadable projects. I've included the code below the line return new Dpc().CallBack(this); throws the above error in MVC4, seems to be ok in MVC 3. Anything thoughts on what I am doing wrong? The unit of work is just me getting the event records out of the system using an existing unit of work. It returns records fine.
namespace DayPilotCalendarMvc3.Controllers
{
public class ScheduleController : Controller
{
/// <summary>
/// Default view
/// </summary>
/// <returns></returns>
public ActionResult Index()
{
return View();
}
/// <summary>
/// DayPilot backend
/// </summary>
/// <returns></returns>
public ActionResult Backend()
{
return new Dpc().CallBack(this);
}
/// <summary>
/// DayPilot handler class
/// </summary>
class Dpc : DayPilotCalendar
{
TrainingCourseBookingUnitOfWork unitOfWork = new TrainingCourseBookingUnitOfWork();
protected override void OnInit(InitArgs e)
{
Update(CallBackUpdateType.Full);
}
protected override void OnFinish()
{
if (UpdateType == CallBackUpdateType.None)
{
return;
}
Events = this.unitOfWork.EventRepository.Get();
DataIdField = "id";
DataTextField = "text";
DataStartField = "eventstart";
DataEndField = "eventend";
}
}
}
}