The following code:
order.Orderlines.Remove(orderline)
Allows not only to remove the connection between Order and Orderline, but also to remove a constant constant sequence. In this situation, there are many subordinate entities.
As I know, in the structure of the entity it is necessary to write additional code:
context.DeleteObject(orderline);
Or
context.Orderlines.DeleteObject(orderline);
So, the deletion rule cannot be fully encapsulated in order.
What is the best choice for deleting a single line in an entity infrastructure?
source
share