Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static void Assign <TEvent>(this Data.AuditEvent to, TEvent from) where TEvent : class
 {
     to.PropertyValues = AsPropertyValues(from).ToList();
 }
Exemplo n.º 3
0
 public static TEvent As <TEvent>(this Data.AuditEvent ev) where TEvent : class, new()
 {
     return(CodeFirst.As <TEvent>(ev));
 }