/// <summary> /// Initializes a new instance of the <see cref="EdmClrProperty" /> class. /// </summary> /// <param name="declaringType">The type the property belongs to.</param> /// <param name="property">The underlying CLR property.</param> /// <param name="type">The type of the property.</param> public EdmClrProperty(EdmClrType declaringType, PropertyInfo property, EdmPrimitiveTypeKind type) : base(declaringType, property.Name, EdmCoreModel.Instance.GetPrimitive(type, IsNullable(property.PropertyType))) { Requires.NotNull(declaringType, nameof(declaringType)); Requires.NotNull(property, nameof(property)); Property = property; }
/// <summary> /// Initializes a new instance of the <see cref="EdmClrProperty" /> class. /// </summary> /// <param name="declaringType">The type the property belongs to.</param> /// <param name="property">The underlying CLR property.</param> /// <param name="type">The type of the property.</param> public EdmClrProperty(EdmClrType declaringType, PropertyInfo property, EdmClrType type) : base(declaringType, property.Name, new EdmEntityTypeReference(type, IsNullable(property.PropertyType))) { Requires.NotNull(declaringType, nameof(declaringType)); Requires.NotNull(property, nameof(property)); Requires.NotNull(type, nameof(type)); Property = property; }