/// <summary> /// Use a list collection /// </summary> public T AsList() { collectionBuilder = attrs => new ListMapping(attrs); CreateIndexMapping(null); if (indexMapping.Columns.IsEmpty()) { indexMapping.AddDefaultColumn(new ColumnMapping { Name = "Index" }); } return((T)this); }
public T AsIndexedCollection <TIndex>(string indexColumn, Action <IndexPart> customIndexMapping) { CreateIndexMapping(customIndexMapping); if (!indexMapping.IsSpecified("Type")) { indexMapping.SetDefaultValue(x => x.Type, new TypeReference(typeof(TIndex))); } if (indexMapping.Columns.IsEmpty()) { indexMapping.AddDefaultColumn(new ColumnMapping { Name = indexColumn }); } return((T)this); }