Hi,
Can you check the below
var query = from m in _db.tblMainAccounts.ToList()
where m.MainAccount == mcode
select new tblMainAccount
{
MainAccount = m.MainAccount,
Title = m.Title,
ControlLevel = m.ControlLevel,
};
foreach (var item in query)
{
textbox1.Text= item.MainAccount;
textbox2.Text= item.Title;
textbox3.Text= item.ControlLevel;
}
Best Regards
Muthuraja