/// <summary>
 /// 设置指定查询的语句并返回当前语句
 /// </summary>
 /// <typeparam name="T">实体类类型</typeparam>
 /// <param name="cmd">更新语句</param>
 /// <param name="expr">Linq表达式</param>
 /// <exception cref="LinqNotSupportedException">Linq操作不支持</exception>
 /// <returns>当前语句</returns>
 /// <example>
 /// <code lang="C#">
 /// <![CDATA[
 /// public class UserRepository : DatabaseTable<User>
 /// {
 ///     //other necessary code
 ///
 ///     public Boolean UpdateEntity(User user)
 ///     {
 ///         return this.Update()
 ///             .Set<User>(c => c.UserName, user.UserName)
 ///             .Where<User>(c => c.UserID == user.UserID)
 ///             .Result() > 0;
 ///
 ///         //UPDATE tbl_Users SET UserName = @UserName WHERE UserID = @UserID
 ///         //@UserName = user.UserName
 ///         //@UserID = user.UserID
 ///     }
 /// }
 /// ]]>
 /// </code>
 /// </example>
 public static UpdateCommand Where <T>(this UpdateCommand cmd, Expression <Func <T, Boolean> > expr)
 {
     return(cmd.Where(SqlLinqCondition.Create <T>(cmd, expr)));
 }
 /// <summary>
 /// 设置指定查询的语句并返回当前语句
 /// </summary>
 /// <typeparam name="T">实体类类型</typeparam>
 /// <param name="cmd">选择语句</param>
 /// <param name="expr">Linq表达式</param>
 /// <exception cref="LinqNotSupportedException">Linq操作不支持</exception>
 /// <returns>当前语句</returns>
 public static SelectCommand Having <T>(this SelectCommand cmd, Expression <Func <T, Boolean> > expr)
 {
     return(cmd.Having(SqlLinqCondition.Create <T>(cmd, expr)));
 }