How can I validate or block user to do Product.Ingredients.Add(new Ingredient()) ?
When user do it, ever a new ingredient is added into ingredient table. I want it add only existing ingredients.
How can I validate or block user to do Product.Ingredients.Add(new Ingredient()) ? When user
Share
You can check that by overriding the save changes method in your DBContext.