User475983607 posted
Your SQL DDL specifically sets a foreign key constraint which resolves to a navigation property in EF.
IdCategory INT NOT NULL
CONSTRAINT FK_Products_IdCategory__Categories_Id FOREIGN KEY(IdCategory) REFERENCES Categories(Id),
Why does EF Core generates public virtual ICollection<Products> Products { get; set; }
in Categories class?
As written, one category can have many products.
Is it possible to prevent generation this property Products
?
Remove the foreign key constraint but doing so does not make sense.