internal StorageModificationFunctionParameterBinding( FunctionParameter parameter, StorageModificationFunctionMemberPath memberPath, bool isCurrent) { DebugCheck.NotNull(parameter); DebugCheck.NotNull(memberPath); Parameter = parameter; MemberPath = memberPath; IsCurrent = isCurrent; }
internal StorageModificationFunctionParameterBinding( FunctionParameter parameter, StorageModificationFunctionMemberPath memberPath, bool isCurrent) { DebugCheck.NotNull(parameter); DebugCheck.NotNull(memberPath); Parameter = parameter; MemberPath = memberPath; IsCurrent = isCurrent; }
internal StorageModificationFunctionParameterBinding( FunctionParameter parameter, StorageModificationFunctionMemberPath memberPath, bool isCurrent) { Contract.Requires(parameter != null); Contract.Requires(memberPath != null); Parameter = parameter; MemberPath = memberPath; IsCurrent = isCurrent; }
public void Can_generate_ia_fk_parameters() { var functionParameterMappingGenerator = new FunctionParameterMappingGenerator(ProviderRegistry.Sql2008_ProviderManifest); var associationType = new AssociationType("A", XmlConstants.ModelNamespace_3, false, DataSpace.CSpace) { SourceEnd = new AssociationEndMember("S", new EntityType("E", "N", DataSpace.CSpace)), TargetEnd = new AssociationEndMember("T", new EntityType("E", "N", DataSpace.CSpace)) }; var associationSet = new AssociationSet("AS", associationType) { SourceSet = new EntitySet(), TargetSet = new EntitySet() }; var memberPath = new StorageModificationFunctionMemberPath( new EdmMember[] { new EdmProperty("P"), associationType.TargetEnd }, associationSet); var parameterBindings = functionParameterMappingGenerator .Generate( new[] { Tuple.Create(memberPath, new EdmProperty("param")) }, useOriginalValues: true) .ToList(); var parameterBinding = parameterBindings.Single(); Assert.Equal("param", parameterBinding.Parameter.Name); Assert.Same(memberPath, parameterBinding.MemberPath); Assert.Equal("String", parameterBinding.Parameter.TypeName); Assert.Equal(ParameterMode.In, parameterBinding.Parameter.Mode); Assert.False(parameterBinding.IsCurrent); }