When i call "f_CategoriNewsGet" function from Page_Load method I'm getting null. But i can see tblNewsler object is full with objects before return line.
protected void Page_Load(object sender, EventArgs e)
{
var tblNewsler = News.f_CategoriNewsGet("ÇEVRE", 18); // return object is always
Table<News> tblNewsler1 = tblNews;
rptNatureNews.DataSource = tblNews != null ? tblNews.Take(6) : null;
rptNatureNews.DataBind();
}
static public Table<News> f_CategoriNewsGet(string _sCategoriName, int _iTop)
{
var tblNews = (from news in DAO.context.GetTable<News>()
join kategori in DAO.context.GetTable<NewsCategori>() on news.M_RefNewsCategoriId equals kategori.M_NewsCategoriId
where kategori.M_Adi.Equals(_sCategoriName)
orderby news.M_InsertDate descending
select news).Take(_iTop);
return tblNews as Table<News>;
}