Custom entity that contains three custom entities of the same type... Very strange!!


i have following entity:


[enableclientaccess]      public class yearlystatisticcalcs {          public yearlystatisticcalcs() {          }            [key]          public guid id { get; set; }          public decimal volume { get; set; }          public decimal produced { get; set; }          public decimal unproduced { get; set; }          public decimal needed { get; set; }          public int satisfactionyes { get; set; }          public int satisfactionno { get; set; }          public int totalcustomers { get; set; }          public int personal { get; set; }            [include]          [association("mykey", "id", "id")]          public weeklystatisticcalcs runningyearlytotal {              get;              set;          }            [include]          [association("mykey2", "id", "id")]          public weeklystatisticcalcs runningyearlygoalstotal {              get;              set;          }



here's custom class includes:


[enableclientaccess]      public class weeklystatisticcalcs {          public weeklystatisticcalcs() {          }            [key]          public guid id { get; set; }          public int leads{get;set;}          public int estimates { get; set; }          public int booked { get; set; }          public int completed { get; set; }          public decimal booking { get; set; }          public decimal produced { get; set; }      }

on server assign each of them two different instances of weeklystatisticscalcs , right before return i've checked they're values in debugger , each was different. time entity makes client 2 differant entities have same values. tried adding third 1 yearlystatisticcalcs , made 3 same value!


what heck going on here!?

 first, overusing enableclientaccess, goes on domainservice.

second, if want list<> need have list<> on class , objects in class need foreign keyed object has list, not other way around. 

keep in mind ria services associates entities same way relational database relates tables. think of how setup table in sql server , how ria services.



Silverlight  >  WCF RIA Services with Silverlight



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........