本文整理汇总了C#中Domain.Project方法的典型用法代码示例。如果您正苦于以下问题:C# Domain.Project方法的具体用法?C# Domain.Project怎么用?C# Domain.Project使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain.Project方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Merge
public static Domain.Entity.Identity Merge(Domain.Entity.Identity entity, dynamic data)
{
Func<ExpandoObject> _data = () => data;
// Project the properties.
entity
.Project(x => x.ID, _data)
.Project(x => x.Name, _data)
.Project(x => x.FirstName, _data)
.Project(x => x.CreationTimestamp, _data, () => DateTime.Parse(data.CreationTimestamp))
;
return entity;
}
示例2: Merge
public static Domain.Entity.OAuth2User Merge(Domain.Entity.OAuth2User entity, dynamic data)
{
Func<ExpandoObject> _data = () => data;
// Project the properties.
entity
.Project(x => x.ID, _data)
.Project(x => x.Identifier, _data)
.Project(x => x.Password, _data)
.Project(x => x.CreationTimestamp, _data, () => DateTime.Parse(data.CreationTimestamp))
.Project(x => x.ValidFrom, _data, () => DateTime.Parse(data.ValidFrom))
.Project(x => x.ValidUntil, _data, () => DateTime.Parse(data.ValidUntil))
;
return entity;
}
示例3: Merge
public static Domain.Entity.DemoValue Merge(Domain.Entity.DemoValue entity, dynamic data)
{
Func<ExpandoObject> _data = () => data;
// Project the properties.
entity
.Project(x => x.ID, _data)
.Project(x => x.Code, _data)
.Project(x => x.Description, _data)
.Project(x => x.Value, _data)
.Project(x => x.CreationTimestamp, _data, () => DateTime.Parse(data.CreationTimestamp))
.Project(x => x.ValidFrom, _data, () => DateTime.Parse(data.ValidFrom))
.Project(x => x.ValidUntil, _data, () => DateTime.Parse(data.ValidUntil))
;
return entity;
}