zzzprojects / GraphDiff

GraphDiff is a library that allows the automatic update of a detached graph using Entity Framework code first.
https://entityframework-graphdiff.net/overview
MIT License
333 stars 101 forks source link

Option to suppress loading associated entities before saving? #133

Closed cryo75 closed 9 years ago

cryo75 commented 9 years ago

When adding or updating entity graphs, is there a way to suppress loading associated entities before executing the INSERT or UPDATE statements?

For example, I have the following entity:

var customer = new CustomerDto()
{
    Name = "test person",
    CustomerType = (CustomerType)cboCustomerTypes.SelectedItem
}

In the above case, the CustomerDto only has the navigation property but the model has both the foreign key and navigation property. Because in the above case the user selected an existing CustomerType, it is not necessary to load the CustomerType again before saving the customer.

Is it possible?

ghost commented 9 years ago

Hi,

no, there currently is no way (I know of) to do that.