at first sorry for my English. I am a beginner in Microsoft web technologies. Currently, I am working on a shopping cart project, and facing the problem given below. Thanks in advance.
Here are my models.
public class Shipment
{
public Guid Id { get; set; }
//Other
public List<OrderedProduct> OrderedProduct { get; set; }
}
public class OrderedProduct
{
public Guid Id { get; set; }
//other
public Guid ShipmentId { get; set; }
public Shipment Shipment { get; set; }
}
In my Controller.
var result = _dbContex.Shipments.Include(X => X.OrderedProduct).ToListAsync();
return new OkObjectResult(result);
It gives me wrong JSON object result.
[{...... "orderedProduct":[{...... end