|
************************************************** **********************************
Please see the query condition code: Customer.Name.Like ("Test"), here I want to use the class. Field (or property)
Excuse me, how do I implement this Customer class, the most important thing is that the class. Field and object. Field point to a stuff at the same time
************************************************** **********************************
Class. Field: There is only one such static,
Object. Field: How many objects can you create in a class, and which object's field should the class. Field point to? Do you say this is possible?
Now that you have queried out customer2, why not directly use the customer2 object to get the Name, use class .Name
You actually want to assign only the value in front of the save and directly call it later. In that case, you can only use one static variable!
Customer customer = new Customer ();
customer.Name = "Test";
Customer.staticName = "Test" // so you can use this variable when querying
customer.Save (); |
|