I have a class created with XML Schema. And I have the following questions, the query returns an anonymous method as well.
var test1 = test from T. Join the test. T. The purse on test_id is equal to p.Test_Id p1p. Paras on params PR_press is equal to p1.Params_Id select new {name = t.Name, param = p1}; This gives 4 records because I have 2 tests and each test has 2 parameters.
I am using an anonymous type for testing. In the above example, I see that Paramat actually belongs to type Paramaram.
I want to put it in my own class which looks like this.
public class MyOwnClass {public string name {get; Set; } Public IList & lt; Parameter & gt; Params {get; Set; }} My pass is in this way, which is included as ILIST
public class paragraph {public string name {get; Set; } Enable Public Buttons {get; Set; }} I have a problem in creating new "PARAM" in my new category and assigning name and enable.
To assign name P1.Name should be assigned to P1 to enable and
. Enabled So what do I really want
confused: -)
Can anyone help?
So I should have finished
test1 Ultimate 1 Parama 2 Test 2 Ultimate Param 1 Parama 2 I hope that Understandable
it gives you what you want
var test1 = Test from T. Select New MyOwnClass {name = t.Name, Ultimate = (from P in test). Mercury tests are included in P1. Par par_id are equal on PAR param. PRIID where p. Test_ID == TTest_ID Select New Ultimate {Name = P1 Name, Enable = P1. Enabled}}. to list() };
Comments
Post a Comment