I have a Silverlight project, and two entities, a master: UnidadDetalle and detail: UnidadLlantas I want to modify an UnidadLlantas object to the UnidadDetalle and I have an error:
System.ServiceModel.DomainServices.Client.DomainOperationException: Error de la operación Submit. Object reference not set to an instance of an object
I try so many ways and this not work, I don't have any more idea, please somebody help me
my code:
mtto_UnidadDetalle unidad = new mtto_UnidadDetalle();
unidad = (mtto_UnidadDetalle)mtto_UnidadDetalleDomainDataSource.DataView.CurrentItem;
unidad.CantidadLlantas = Int32.Parse(txtCantidadLlantas.Text);
((mtto_UnidadLlantas)unidad.mtto_UnidadLlantas.Where(u => u.NumeroLlanta == 0).FirstOrDefault()).TipoLlanta = 36447;
mtto_UnidadDetalleDomainDataSource.SubmitChanges();
When debbug this, before the submit I inspected the object, and this look well, with all info ok, I don't know how fix it