Data collection entity Class Construction
For the features of each data set server, we use the entity class to represent a piece of data in reality, and the data set we useC #Generic class inList <t>To indicate storage. In Entity class representation, the character type isStringThe value type is representedInt.
// The car object class [serializable ()] public class car {public string location {Get; set;} public int price {Get; set;} public int numcars {Get; set ;}public int numavail {Get; Set ;}}
Since it is necessary to call and pass in the server and client, these entity classes must be serialized, that is, before the entity class is built[Serializable]Identifier. In data construction, we have adoptedC #3.0The property device that appears only after, that is, the image is not required.JavaConstruct a specificGetAndSetThe method is to directly declare in the domainGet;AndSet;This greatly facilitates the entire programming process.