In Entity Framework you can find out the state of an object by calling context.ObjectStateManager.GetObjectStateEntry(obj). To be able to use this method, your object needs to be attached to the context. If not, it will raise an InvalidOperationException. And that will be the case if you are saving an object that was just created (and not attached yet).
So what I do is using an extension method to determine what to do in the Save() method:
public static bool IsNew(this EntityObject entity) { return entity.EntityKey == null || entity.EntityKey.IsTemporary; }
If an object isn't attached yet, its EntityKey will be null. Otherwise, if it's attached but new, its EntityKey will be indicated as temporary.
The Save() mehtod calls the IsNew() method and acts accordingly.
private void Save(Product product) { if (product.IsNew()) { Insert(product); } else { Update(product); } }