I do not think I can actually add a single field (column) to an existing IEnumerable but what I want is one The new IEnumerable that has been taken from an existing IEnumerable with a calculated field. The pseudocode appears in WebMatrix using web pages:
var db = Database.Open ("LOS"); Var ie = db.Query (sqlAssignments); // Create a new ie2 which has an extra field // // Ie2 & lt; === i.e. new area c = ie.a + ie.b var grid = new WebGrid (ie2, with additional parameters); I know how to do this looping through all the rows i.e. But I'm hoping that something is more elegant.
How about:
var ie2 = ie Selection (x = & gt; new {x.Foo, x.Bar, sum = x.Abc + x.Def}); Var grid = new webgrid (i.e. 2);
Comments
Post a Comment