When my xaml is done on a database in some data, I often use "logical"
For example:
public list & lt; SomeClass & gt; Like giving a list or amount of totals. ListOfSomeClass {get; Set;} get public double SumOfSomeClass {getlistOfSomeClass.Sum (s = & gt; s.Totals); }} Get Public Bull Sumositive {If (SumOfSomeClass> = 0) is true; Second false return;}}
In this way I can force SumPositive and SumOfSomeClass Is it considered a good practice? Even if it becomes more complicated than this? Or would it be better to call a method and return to the result? Other classes about the call or even What about a database?
Property The recipient is expected to be fast and idempotent (i.e. no destructive action should be taken), though it is perfectly okay to override the object's in-memory archive, but I get or Set can not do any heavy load in parts. And while talking about running again, I just cache the results to save a few milliseconds.
Comments
Post a Comment