Ejemplo n.º 1
0
        public static DataPropertyCollection GetUpdates(this Dao dao)
        {
            DataPropertyCollection result = new DataPropertyCollection();

            dao.GetNewAssignValues().Each(av => result.Add(av.ColumnName, av.Value));
            return(result);
        }
Ejemplo n.º 2
0
        public static DataPropertyCollection FromInstance(object instance)
        {
            DataPropertyCollection result = new DataPropertyCollection();

            instance.EachDataProperty((pi, obj) => new DataProperty {
                Name = pi.Name, Value = obj
            }).Each(dp => result.Add(dp));
            return(result);
        }
Ejemplo n.º 3
0
        public static DataPropertyCollection FromDao(Dao dao)
        {
            DataPropertyCollection dpc = new DataPropertyCollection();

            typeof(Dao).GetProperties().Where(pi => pi.HasCustomAttributeOfType <ColumnAttribute>()).Each(pi => dpc.Add(pi.Name, pi.GetValue(dao)));
            return(dpc);
        }