/// <summary> /// The factory method for constructing the <see cref="T:System.Data.Entity.Core.Metadata.Edm.RowType" /> object. /// </summary> /// <param name="properties">Properties of the row type object.</param> /// <param name="metadataProperties">Metadata properties that will be added to the function. Can be null.</param> /// <returns> /// A new, read-only instance of the <see cref="T:System.Data.Entity.Core.Metadata.Edm.RowType" /> object. /// </returns> public static RowType Create( IEnumerable <EdmProperty> properties, IEnumerable <MetadataProperty> metadataProperties) { Check.NotNull <IEnumerable <EdmProperty> >(properties, nameof(properties)); RowType rowType = new RowType(properties); if (metadataProperties != null) { rowType.AddMetadataProperties(metadataProperties.ToList <MetadataProperty>()); } rowType.SetReadOnly(); return(rowType); }
/// <summary> /// The factory method for constructing the <see cref="RowType" /> object. /// </summary> /// <param name="properties">Properties of the row type object.</param> /// <param name="metadataProperties">Metadata properties that will be added to the function. Can be null.</param> /// <returns> /// A new, read-only instance of the <see cref="RowType" /> object. /// </returns> public static RowType Create(IEnumerable <EdmProperty> properties, IEnumerable <MetadataProperty> metadataProperties) { Check.NotNull(properties, "properties"); var rowType = new RowType(properties); if (metadataProperties != null) { rowType.AddMetadataProperties(metadataProperties); } rowType.SetReadOnly(); return(rowType); }
/// <summary> /// The factory method for constructing the <see cref="RowType" /> object. /// </summary> /// <param name="properties">Properties of the row type object.</param> /// <param name="metadataProperties">Metadata properties that will be added to the function. Can be null.</param> /// <returns> /// A new, read-only instance of the <see cref="RowType" /> object. /// </returns> public static RowType Create(IEnumerable<EdmProperty> properties, IEnumerable<MetadataProperty> metadataProperties) { Check.NotNull(properties, "properties"); var rowType = new RowType(properties); if (metadataProperties != null) { rowType.AddMetadataProperties(metadataProperties.ToList()); } rowType.SetReadOnly(); return rowType; }