C # Operations XML database type, Oracle xmltype

Source: Internet
Author: User

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}); }
    }
}

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.