2
Answers

lambda query printing curly braces '{' in result

ceci bela

ceci bela

10y
723
1
hi. 
 
I got this query below that's printing rows with curly braces '{' in view.   How can I fix that? 
 
Lambda Query:  
var q = db.table1.Where(n => n.user== USER).Select(n => new { n.Name, n.LastName }); 
ViewBag.test = q;
View:
@foreach (var item in ViewBag.test) { @item }
Output:
 { Name = john, LastName=Smith} { Name = Mike, LastName=mojie
 
Thanks in advance 
Answers (2)