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