Distributed Database System-Implementation of business travel booking system (4)

Source: Internet
Author: User
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.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.