How to update naviation property with new values in EF Core?
问题 Soo... I have this simple model for Product : public class Product { public int Id { get; set; } // Other things public ICollection<ProductAttribute> ProductAttributes { get; set; } } And ProductAttributes with ProductId and Name as multifield keys. public class ProductAttribute { public int? ProductId { get; set; } // Key public ProductAttributeName? Name { get; set; } // Key public string Value { get; set; } } And in my WebAPI project I have this method: public async Task<IActionResult>