/// <summary> /// Configures the property to use the given collation. The database column will be be created with the given /// collation, and it will be used implicitly in all collation-sensitive operations. /// </summary> /// <param name="propertyBuilder"> The builder for the property being configured. </param> /// <param name="collation"> The collation. </param> /// <param name="fromDataAnnotation"> Indicates whether the configuration was specified using a data annotation. </param> /// <returns> /// The same builder instance if the configuration was applied, /// <see langword="null" /> otherwise. /// </returns> public static IConventionPropertyBuilder UseCollation( [NotNull] this IConventionPropertyBuilder propertyBuilder, [CanBeNull] string collation, bool fromDataAnnotation = false) { if (propertyBuilder.CanSetCollation(collation, fromDataAnnotation)) { propertyBuilder.Metadata.SetCollation(collation, fromDataAnnotation); return(propertyBuilder); } return(null); }