/// <summary>
        /// Sets the Index.
        /// </summary>
        /// <param name="manyToOneMapping">The many to one mapping.</param>
        /// <param name="indexName">Name of the index.</param>
        public static void Index(this ManyToOneMapping manyToOneMapping, string indexName)
        {
            if (manyToOneMapping.Columns.First().IsSpecified("Index"))
            {
                return;
            }

            foreach (var column in manyToOneMapping.Columns)
            {
                var columnPart = new ColumnPart(column);
                columnPart.Index(indexName);
                //column.Index =indexName;
            }
        }
示例#2
0
 public void ShouldSetIndex()
 {
     columnPart.Index("index1");
     mapping.Index.ShouldEqual("index1");
 }