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; }
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; }
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; }