Παρουσίαση με Ετικέτες

Automatic properties for Xpo
02 Ιουνίου 09 05:23 πμ | tolisss | 0 σχόλια   
  The problem Xpo in order to support transactions implements some special kind of property setters like private string lastName; public string LastName { get { return lastName; } set { string oldValue = lastName; if (oldValue == value) return; lastName = value; OnChanged("Name", oldValue, value); } } Or a little more elegant like private string lastName; public string LastName { get { return lastName; } set { SetPropertyValue("LastName", ref lastName, value); } } Imagine you want to Design a fairly simple model like Customer –> Orders. A Customer should have LastName, FilrstName, Age and Orders as properties and Order only an Amount property. Using the above approach one could write the following code to describe the above model.

Διαβάστε περισσότερα »

Δημοσίευση στην κατηγορία: , , , ,

Search

Go

Το Ιστολόγιο

Ιστορικό Δημοσιεύσεων

Συνδρομές