IList<Model.FileInfo> IFile.GetFiles(int blogId)
{
string SQL_THIS = SQL_SELECT_FILE_BY_BLOGID;
SqlParameter[] paras = new SqlParameter[]{
new SqlParameter(PARAM_BLOG_ID,SqlDbType.Int)};
paras[0].Value = blogId;
IList<Model.FileInfo> fileInfos = new List<Model.FileInfo>();
using (SqlDataReader rdr = SQLHelper.ExecuteReader(SQLHelper.ConnectionString, CommandType.Text, SQL_THIS, paras))
{
while(rdr.Read())
{
FileInfo fileInfo = new FileInfo(rdr.GetInt32(0),
rdr.GetInt32(1),
rdr.GetString(2),
rdr.GetDouble(3),
rdr.GetString(4),
rdr.GetString(5),
rdr.GetDateTime(6),
rdr.GetInt32(7),
rdr.GetInt32(8));
fileInfos.Add(fileInfo);
}
}
return fileInfos;
//throw new Exception("The method or operation is not implemented.");
}