public static T SetParameter <T, U>(this T item, Expression <Func <T, U> > expression, SqlCommand cmd)
        {
            var member = expression.Body as MemberExpression;

            var columnName = member.Member.Name;
            var itemType   = member.Expression.Type;

            PropertyInfo property = PropertyInfoExtensions.GetProperty(itemType, columnName);

            if (property != null)
            {
                var dbValue = property.GetValue(item).ToDbValue();
                cmd.Parameters.AddWithValue(columnName, dbValue);
            }

            return(item);
        }
        /// <summary>
        /// Create <see cref="SqlParameter"/> for the specified property defined by <paramref name="expression"/>
        /// </summary>
        /// <typeparam name="T">Business entity type parameter</typeparam>
        /// <typeparam name="U">Property value type parameter</typeparam>
        /// <param name="item">business entity instance</param>
        /// <param name="expression">specific property used to create <see cref="SqlParameter"/> instance.</param>
        /// <returns>New <see cref="SqlParameter"/> instance with name of PropertyName and value of the Property itself.</returns>
        public static SqlParameter ToLikeParameter <T, U>(this T item, Expression <Func <T, U> > expression)
        {
            var member = expression.Body as MemberExpression;

            var columnName = member.Member.Name;
            var itemType   = member.Expression.Type;

            PropertyInfo property = PropertyInfoExtensions.GetProperty(itemType, columnName);

            if (property != null)
            {
                var dbValue = property.GetValue(item).ToDbValue();
                return(new SqlParameter("@" + columnName, "%" + dbValue + "%"));
            }

            return(null);
        }