Found the solution: For no good reason I forgot to add the line "customerID = value.CustomerID;" in the association part. In my data handling classes I just saved the CustomerID and not the customerID. That makes the difference because just the customerID is saved in the database and not the CustomerID.
private EntityRef<Customer> _Customer;
[Association(Storage = "_Customer", ThisKey = "CustomerID", IsForeignKey = true)]
public Customer Customer
{
get { return this._Customer.Entity; }
set
{
NotifyPropertyChanging("Customer");
this._Customer.Entity = value;
if (value != null)
customerID = value.CustomerID;
NotifyPropertyChanged("Customer");
}
}