/// <summary> /// 根据sql查询并转换成实体 /// </summary> /// <typeparam name="V">继承BaseTO的实体类型</typeparam> /// <param name="sqlText"></param> /// <param name="cmdType"></param> /// <param name="parameters"></param> /// <returns></returns> public static T ExecuteToEntity <T>(string sqlText, CommandType cmdType, List <SqlParameter> parameters) where T : CAS.Entity.BaseDAModels.BaseTO, new() { T entity = default(T); BaseDAO <T> da = new BaseDAO <T>(GetConnectionName <T>()); entity = da.GetItem(sqlText, cmdType, parameters); return(entity); }