Not even sure I knew how to give the correct title for this question...
I have a class:
~ in 1st DLL
namespace ServerEnd
{
class A
{
string field1 {get; set;}
List<B> Nested {get;set;}
}
class B
{
string field1 { get; set;}
}
}
~in 2nd DLL
namespace ClientEnd
{
class A
{
string field1 {get; set;}
List<B> Nested {get;set;}
}
class B
{
string field1 { get; set;}
}
}
Now if I want to populate the client objects with the server objects I would use this:
var test = new ServerEnd.A();
test.field1 = "a test";
test.Nested = new ServerEnd.A.B();
test.Nested.Add(new (){field1 = "hi1" } ;
var clientModel = from x in test
select new ClientEnd.A
{
field1 = x.field1,
* what do i put here to transpose data from list object *
};
But how do I populate the List from Server to Client?
Hope this is clear?
thanks