//获取对应的ID评论 public List <Questions> GetModelById(int ThemeId) { List <Questions> list = new List <Questions>(); Questions info = null; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@ThemeId", ThemeId) }; using (SqlDataReader rd = Helper.ExecuteReader("GetComById", CommandType.StoredProcedure, param)) { while (rd.Read()) { info = new Questions(rd.GetString(0), rd.GetDateTime(1), rd.GetString(2)); list.Add(info); } } return(list); }
/// <summary> /// Deprecated Method for adding a new object to the Questions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToQuestions(Questions questions) { base.AddObject("Questions", questions); }
/// <summary> /// Create a new Questions object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="inputTypesId">Initial value of the InputTypesId property.</param> /// <param name="optionGroupsId">Initial value of the OptionGroupsId property.</param> public static Questions CreateQuestions(global::System.Int32 id, global::System.Int32 inputTypesId, global::System.Int32 optionGroupsId) { Questions questions = new Questions(); questions.Id = id; questions.InputTypesId = inputTypesId; questions.OptionGroupsId = optionGroupsId; return questions; }