You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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; }
}`
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?
The text was updated successfully, but these errors were encountered: