Esempio n. 1
0
        // ---------------------------------------------------------------------------------------------
        // Public Static Methods
        // ---------------------------------------------------------------------------------------------

        public static void ExecuteOne(T item)
        {
            var updateCommand = new UpdateCommand <T>();

            foreach (var property in Mapper.GetColumnProperties(typeof(T), false))
            {
                updateCommand.AppendUpdateColumnValue(property, property.GetValue(item, null));
            }

            updateCommand.AppendWhereCondition(Mapper.GetIdentityColumnProperty(typeof(T)), Mapper.GetIdentityColumnValue(item));

            updateCommand.ExecuteOne();
        }
Esempio n. 2
0
 public static void Update <T>(T item)
 {
     UpdateCommand <T> .ExecuteOne(item);
 }