public Entity ReplaceISomeInterface(ISomeInterface newValue) { var entity = iSomeInterfaceEntity; if(entity == null) { entity = SetISomeInterface(newValue); } else { entity.ReplaceISomeInterface(newValue); } return entity; }