Writing data to sql via WCF/LINQ, null exception?

    General discussion

  • Hi,

    Probably something simple but i am trying to add data to sql from a silver light application by passing it a list of data(of type of a table). But when i try and pass the data across to the dataservice it is null when it is recieved?

    if it helps the methods i am using are:

            public EmployeeShiftPlan AddShift(List<EmployeeShiftPlan> lsShifts)
                using (tapLinqDataContext db = new tapLinqDataContext())
                    foreach (EmployeeShiftPlan x in lsShifts)
                return lsShifts[0];
    private void btnSaveClose_Click(object sender, RoutedEventArgs e)
                DataServiceClient svc = new DataServiceClient();
                svc.AddShiftCompleted += new EventHandler<AddShiftCompletedEventArgs>(svc_AddShiftCompleted);
    Wednesday, October 19, 2011 3:45 AM

All replies