Code
public void SaveJournal(DateTime workDay, WorkOrderTask workOrderTask, string category, double hours)
{
IPSUnitOfWork unit = _context.CreateUnitOfWork();
Journal j = new Journal();
j.DateEntered = DateTime.Now;
j.ActualWork = (decimal)hours;
j.WorkCategory = category;
j.WorkDay = workDay;
j.Worker = _currentUser.ToLower();
j.WorkOrderTaskId = workOrderTask.Id;
unit.Add(j);
unit.SaveChanges();
}
Problem
Trying to save a record to the database. I get an error.
************** Exception Text **************
System.NotImplementedException: The method or operation is not implemented.
at ..(String , String )
at ..(Entity , ICollection`1 )
at ..(Entity , List`1 )
at ..(UnitOfWork , IEnumerable`1 , IEnumerable`1 )
at Mindscape.LightSpeed.UnitOfWork.SaveChanges(Boolean reset)
at Mindscape.LightSpeed.UnitOfWorkBase.SaveChanges()
at IPSClient.Controller.IPSController.SaveJournal(DateTime workDay, WorkOrderTask workOrderTask, String category, Double hours) in C:\Users\milivojm\Documents\Visual Studio 2008\Projects\IPSClient\IPSClient\Controller\IPSController.cs:line 104
at IPSClient.FormNewJournal.buttonSave_Click(Object sender, EventArgs e) in C:\Users\milivojm\Documents\Visual Studio 2008\Projects\IPSClient\IPSClient\FormNewJournal.cs:line 46
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)