public List<Channel> GetTVGuideChannelsForGroup(int groupID)
{
SqlBuilder sb1 = new SqlBuilder(StatementType.Select, typeof (Channel));
SqlStatement stmt1 = sb1.GetStatement(true);
SqlStatement ManualJoinSQL = new SqlStatement(stmt1.StatementType, stmt1.Command,
String.Format(
"select c.* from Channel c inner join GroupMap g on (c.idChannel=g.idChannel and g.idGroup = '{0}') where visibleInGuide = 1 and isTv = 1 order by g.sortOrder",
groupID), typeof (Channel));
return ObjectFactory.GetCollection<Channel>(ManualJoinSQL.Execute()) as List<Channel>;
}