本文整理汇总了C#中Marten.Schema.DocumentMapping.DuplicateField方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentMapping.DuplicateField方法的具体用法?C# DocumentMapping.DuplicateField怎么用?C# DocumentMapping.DuplicateField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Marten.Schema.DocumentMapping
的用法示例。
在下文中一共展示了DocumentMapping.DuplicateField方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: generate_code
public void generate_code()
{
var mapping = new DocumentMapping(typeof (Target));
mapping.DuplicateField("Number");
mapping.DuplicateField("Date");
var code = DocumentStorageBuilder.GenerateDocumentStorageCode(new[] {mapping});
Debug.WriteLine(code);
}
示例2: Modify
public override void Modify(DocumentMapping mapping, MemberInfo member)
{
var field = mapping.DuplicateField(member.Name, PgType);
var indexDefinition = mapping.AddIndex(field.ColumnName);
indexDefinition.Method = IndexMethod;
if (IndexName.IsNotEmpty())
indexDefinition.IndexName = IndexName;
}
示例3: when_deriving_the_table_definition_from_the_database_schema_Tests
public when_deriving_the_table_definition_from_the_database_schema_Tests()
{
_schema = theStore.Schema;
theMapping = _schema.MappingFor(typeof(User)).As<DocumentMapping>();
theMapping.DuplicateField("UserName");
_storage = _schema.StorageFor(typeof(User));
theDerivedTable = _schema.DbObjects.TableSchema(theMapping);
}
示例4: when_deriving_the_table_definition_from_the_database_schema_Tests
public when_deriving_the_table_definition_from_the_database_schema_Tests()
{
ConnectionSource.CleanBasicDocuments();
_schema = _container.GetInstance<DocumentSchema>();
theMapping = _schema.MappingFor(typeof(User));
theMapping.DuplicateField("UserName");
_storage = _schema.StorageFor(typeof(User));
theDerivedTable = _schema.TableSchema(theMapping.TableName);
}
开发者ID:kiliman,项目名称:marten,代码行数:13,代码来源:when_deriving_the_table_definition_from_the_database_schema_Tests.cs
示例5: Modify
public override void Modify(DocumentMapping mapping, MemberInfo member)
{
mapping.DuplicateField(member.Name, PgType);
}