public static TEvent As <TEvent>(Data.AuditEvent ev) where TEvent : class, new() { var res = new TEvent(); (from pv in ev.PropertyValues let d = pd(typeof(TEvent), pv.PropertyId) where d != null select new { pv, d } ) .ForEach(x => x.d.Move(x.pv, res)); return(res); }
public static void Assign <TEvent>(this Data.AuditEvent to, TEvent from) where TEvent : class { to.PropertyValues = AsPropertyValues(from).ToList(); }
public static TEvent As <TEvent>(this Data.AuditEvent ev) where TEvent : class, new() { return(CodeFirst.As <TEvent>(ev)); }