XML type for a long time there has been no attention, there are times just to see;
The thing to do in this study
1. Design a C # class to generate XML Schemas (XML Schema)
Designing a class and then generating a table from a class there may be a lot of people who are ignorant; just as opposed to ORM.
The most important XML schemas can be used to constrain the validity of XML in the database;
2, based on the previous step of the XML Schema, we create a data table, and contains this and the top C # class corresponding to the XML type;
3, insert some data;
4, change the class of C # to regenerate schema in the update database schema
This step assumes that the business changes to see how the changes are made, whether it is convenient to
5, use C # to write a Web page, display this data;
6. Periodic summary
Good start:
First, design a C # class to generate XML schema class code:
Classes are as follows
namespace Model {///<summary>///phone///</summary> public class Phone {
String _code; <summary>///Phone number///</summary> public string Code {get {RE Turn _code;
set {_code = value;}
} Phonetype _type;
Public Phonetype Type {get {return _type;}
set {_type = value;} }///<summary>///phone type///</summary> public enum Phonetype {[XmlEnum (Nam
E = "Unknown"]]//xml name Unknown, [xmlenum (name = "Move")] Mobile, [xmlenum (name = "fixed"]] Fixed,}///<summary>///phone set///</summary> [XmlRoot ("Phones")] public class phones:list<phone> {public void Add (string code, Phonetype type) {base.
ADD (New Phone () {code = code, type = type}); }
}
}