Entity Framework does not support triggers. Is there something that reproduces their behavior?
I'm not interested in inserting SQL queries in my code.
I have this question because I have a case which I want to create a new table on my database that will be filled with information whenever something is inserted in another existing table.
Like this:
Suppose I have a
Prodcuts
table. I want to create theProductsStatus
table.If something is inserted into the
Products
table, I want to add a record to theProductStatus
table, storing theProductId
(foreign key), aDateTime
column and aStored
status for this product.The point is to avoid refactoring every place where I add a product on my code in order to do this new operation.