How to delete a subobject in the context of a poco structure on one line?

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?

+3
source share
1 answer

, , ,, , , .

0

Source: https://habr.com/ru/post/1731166/


All Articles