KeyManyToOnePart Reference(Member property, IEnumerable <string> columnNames)
        {
            var reference = new KeyManyToOneMapping
            {
                Name  = property.Name,
                Class = new TypeReference(property.PropertyType),
                ContainingEntityType = typeof(T)
            };

            foreach (var column in columnNames)
            {
                reference.AddColumn(new ColumnMapping {
                    Name = column
                });
            }

            var keyPart = new KeyManyToOnePart(reference);

            mapping.AddReference(reference);

            return(new KeyManyToOnePart(reference));
        }
 public void SetUp()
 {
     this.mapping = new KeyManyToOneMapping();
     this.keyPart = new KeyManyToOnePart(mapping);
 }