Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
I am now going to attempt the problem solving ritual.
Requirements:
-have a problem or piece of unoptimized code and you don't know how tk fix/improve it
-be able to sleep/take a nap
Now before I fall asleep the ritual should provide me with an epiphany to solve my problem
Plan b:
I have a class ninja (model), with an observablecollection<property> properties and an observablecollection<gearslot> gearslots;
,a class gear with an observablecollection<property> properties and an Category category:
And a class gearslot with a Gear gear and a Category category;
Via entity framework this results in several property entries per ninja
And several property entries per gear item
All good so far.
I now actually want the ninja property values, to be the sum of the gear property values
So a ninja has int, agi and str of 0.
Gear has 0 or more stats.
If the ninja has two pieces of gear on with agi +1, then the ninja agi should be 2
If possible i would like the logic in the model.
Else i have to put it in the viewmodel.
That i can figure out, its just so inelegant....
undefined
entity framework
linq
c#
ef
sql
wpf