private static IEdmAction AddBindableAction(EdmModel model, string name, IEdmEntityType bindingType, bool isCollection) { IEdmEntityContainer container = model.EntityContainers().Single(); var action = new EdmAction( container.Namespace, name, returnType: null, isBound: true, entitySetPathExpression: null); IEdmTypeReference bindingParamterType = new EdmEntityTypeReference(bindingType, isNullable: false); if (isCollection) { bindingParamterType = new EdmCollectionTypeReference(new EdmCollectionType(bindingParamterType)); } action.AddParameter("bindingParameter", bindingParamterType); model.AddElement(action); return action; }