Create the XSD dataset table from the class in C#
-
24 februarie 2012 11:42
hi all,
anyone knows how can i create the XSD file from the class? where it can create the or show the same compposition and Hierarchicalrelationship in XSD dataset tables.
please refer the my code as follow ,
class CustomerClass { private string _name; private string _add; private List<aniruddha> _aniruddha; public string Name { get { return _name; } set { _name = value; } } public string Add { get { return _add; } set { _add = value; } } public List<aniruddha> Aniruddha { get { return _aniruddha; } set { _aniruddha = value; } } }This is customer class contain the Aniruddha class as the list.</aniruddha></aniruddha>class Aniruddha { private int _phoneNo; private string _emailId; private string _fbId ; public int PhoneNo { get { return _phoneNo; } set { _phoneNo = value; } } public string EmailId { get { return _emailId; } set { _emailId = value; } } public string FbId { get { return _fbId; } set { _fbId = value; } } }this is aniruddha class.Please anyone can help me out ? can i show composition relationship of aniruddha an customer class in XSD file , where tables will show me relataionship , i wants to do it programaticaly in C#
thanx in advance
Toate mesajele
-
24 februarie 2012 12:21
Convert your Objects of classes in XML; and then use below two methods:
http://msdn.microsoft.com/en-us/library/system.data.dataset.readxml.aspx
http://msdn.microsoft.com/en-us/library/system.data.dataset.getxmlschema.aspx
Viral.
MCTS - WPF, WinForms, Sql Server 2008
- Marcat ca răspuns de Bob ShenMicrosoft Contingent Staff, Moderator 5 martie 2012 03:00