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:
[OperationContract]
public EmployeeShiftPlan AddShift(List<EmployeeShiftPlan> lsShifts)
{
using (tapLinqDataContext db = new tapLinqDataContext())
{
foreach (EmployeeShiftPlan x in lsShifts)
{
db.EmployeeShiftPlans.InsertOnSubmit(x);
db.SubmitChanges();
}
}
return lsShifts[0];
}
private void btnSaveClose_Click(object sender, RoutedEventArgs e)
{
DataServiceClient svc = new DataServiceClient();
svc.AddShiftCompleted += new EventHandler<AddShiftCompletedEventArgs>(svc_AddShiftCompleted);
svc.AddShiftAsync(lsNewShifts);
}