forked from simplefx/Simple.OData
-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Description
I'm trying to do a POST with the Simple OData Client to my API but when we try to do this I get:
'The property 'Producer' does not exist on type 'Waste.QualificationsCore.API.Interface.OData.Qualifications.QualificationDto'. Make sure to only use property names that are defined by the type or mark the type as open type.'
The code the POST is:
return await _client.For<QualificationDto>(ODataPath(Paths.ODataV1Qualifications)) .Set(request) .InsertEntryAsync(token);
The DTO I'm trying to add is:
` public class QualificationDto
{
[Key]
public Guid QualificationId { get; set; }
[NonFilterable]
[NotFilterable]
public DateTime? DocumentDate { get; set; }
[NonFilterable]
[NotFilterable]
public DateTime? ExpiryDate { get; set; }
public string IdentificationCode { get; set; }
[AutoExpand]
public ProducerDto Producer { get; set; }
}`
The Producer is a reference to an object in another datasource so I want to show it as an seperate object and not an ID. (e.g. Owned type on EF).
How can I fix/do this?
Metadata
Metadata
Assignees
Labels
No labels