New Posts New Posts RSS Feed: Custom Type
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Custom Type

 Post Reply Post Reply
Author
Togas View Drop Down
Newbie
Newbie
Avatar

Joined: 26-Jul-2011
Location: Minneapolis
Posts: 11
Post Options Post Options   Quote Togas Quote  Post ReplyReply Direct Link To This Post Topic: Custom Type
    Posted: 26-Jul-2011 at 12:08pm
I'm having trouble getting my custom type to populate.

This works:
<DataContract()>
Public Class Employee
  Implements IKnownType

  <DataMember()>
  Public Property UserId As Integer
  <DataMember()>
  Public Property FirstName As String

End Class
'From my viewmodel
Dim q2 = _mgr.EmployeeYearbooks.Select(Function(emp) New Employee With {
                                             .UserId = emp.UserId,
                                             .FirstName = emp.EmployeesOMD.FirstName}
                                             )

    q2.ExecuteAsync(Sub(e) e.Results.ForEach(Sub(ee) Employees.Add(ee)))

But when I add one property it stops working, any thoughts?
This doesn't work.

<DataContract()>
Public Class Employee
  Implements IKnownType

  <DataMember()>
  Public Property UserId As Integer
  <DataMember()>
  Public Property FirstName As String
  <DataMember()>
  Public Property BirthPlace As String

End Class


'From my viewmodel
    Dim q2 = _mgr.EmployeeYearbooks.Select(Function(emp) New Employee With {
                                             .UserId = emp.UserId,
                                             .BirthPlace = emp.BirthPlace,
                                             .FirstName = emp.EmployeesOMD.FirstName}
                                             )

    q2.ExecuteAsync(Sub(e) e.Results.ForEach(Sub(ee) Employees.Add(ee)))




Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 28-Jul-2011 at 3:54pm
Hi Togas;

This is strange. All you did was just add 1 more property, BirthPlace, and it "stops working". Could you elaborate what you mean by "stops working"? What were you expecting and what were you observing?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down