Error on Update Or Add

Hi, I'm getting this error on a update/insert in RAdzen

:5000/odata/SoterMaquinas/TUcAvaliacaos:1 Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
:5000/odata/SoterMaquinas/TUcAvaliacaos(1):1 PATCH http://localhost:5000/odata/SoterMaquinas/TUcAvaliacaos(1) net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)
:5000/odata/SoterMaquinas/TUcAvaliacaos(2):1 PATCH http://localhost:5000/odata/SoterMaquinas/TUcAvaliacaos(2) net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)

There is probably a server-side exception. You can check Radzen's Output window to see what it is. In addition you can attach a debugger to the server process.

in the output it gives:

System.InvalidOperationException: The EDM instance of type '[Prj187SoterMaquinas.Models.SoterMaquinas.TUcNegocioViatura Nullable=True]' is missing the property 'Negocio_Id'.

but if it is nullable it would not need the field that is external key.

Is the Negocio_Id property a nullable type in the generated model class?

Yes,

...
public int? Negocio_Id
{
get;
set;
}

[ForeignKey("Negocio_Id,Viatura_Id")]
public TUcNegocioViatura TUcNegocioViatura { get; set; }
public int Viatura_Id
{
  get;
  set;
}

...

It seems that you've hit this issue:

Maybe the only workaround will be to remove the relation from the data-source meta (look for x-foreignKey) or ignore the model in server/Models folder and remove directly the attribute.

Thank you for the reply, I will find a workaround.

Try to remove the property from the $expand parameter also.