The model:
namespace ExampleNamespace
{
public class ExampleModel
{
public SystemProperties Sys { get; set; }
public Dictionary<string, string> Id { get; set; }
public Dictionary<string, string> Name { get; set; }
public Dictionary<string, string> Email { get; set; }
public Dictionary<string, string> Country { get; set; }
public Dictionary<string, string> EmployeeId { get; set; }
public Dictionary<string, Reference> Image { get; set; }
}
}
...
var entry = await _contentfulManagementClient.CreateOrUpdateEntry<ExampleModel>(
exampleModel,
exampleModel.Sys.Id, // I've manually assigned this value
contentTypeId: "ExampleModel");
...
Contentful.Core: No field with id "sys" found.[
{
"name": "unknown",
"path": [
"fields",
"sys"
]
}
].
I can create an entry in Contentful with this model if I remove the Sys property. However, I am unable to update the entry due to version information within the Sys property will be missing. If I add the sys property Contentful returns a 422 with the information above. What am I doing wrong here?