本文整理汇总了C#中Entities.CreateEntitiesAsync方法的典型用法代码示例。如果您正苦于以下问题:C# Entities.CreateEntitiesAsync方法的具体用法?C# Entities.CreateEntitiesAsync怎么用?C# Entities.CreateEntitiesAsync使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entities
的用法示例。
在下文中一共展示了Entities.CreateEntitiesAsync方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TransformTextAsync
/// <summary>
/// テキスト変換を実行します。
/// </summary>
public async void TransformTextAsync()
{
const string NAMESPACE = @"Estelle.Asme.Redmine";
var ns = @"DataTransferObjects";
var output = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName(), ns);
var context = new EntitiesContext
{
Namespace = new Namespace(NAMESPACE, ns),
Imports = new[] { @"System", },
TypeAttributes = TypeAttributes.Public | TypeAttributes.Class,
IsPartial = true,
TypeName = new TypeName(@"", @"", @"_entity"),
Inherits = @"EntityBase",
Implements = new[] { @"IEntity" },
MemberAttribute = MemberAttributes.Assembly | MemberAttributes.Public | MemberAttributes.Final, // Public -> virtual, Public | Final -> public
OutputPath = output,
};
var entities = new Entities(context);
await entities.CreateEntitiesAsync();
TextTemplatingProcess.StartExplorer(output);
}