private const string SQL_SELECT_DOUBLE = "select a.id, a.CategoryId, a.Title, a.FullTitle, a.Renqun, a.Hot, a.CreateTime, a.ImageUrl from food_Content AS a inner join food_Category AS b ON a.CategoryId = b.id WHERE (b.id =@id)";
/// <summary>
/// 返回同类别的所有文章
/// </summary>
/// <param name="id">类别id</param>
/// <returns></returns>
public IList<FoodInfo> GetContentInfoByCategoryId(int id) {
IList<FoodInfo> Cateinfoes = new List<FoodInfo>();
SqlParameter parm = new SqlParameter("@id", SqlDbType.Int);
parm.Value = id;
using (SqlDataReader sdr = SqlHelper.ExecuteReader(SqlCon, CommandType.Text, SQL_SELECT_DOUBLE, parm)) {