Click here to Skip to main content
15,878,945 members
Articles / Desktop Programming / WPF

Building WPF Applications with Self-Tracking Entity Generator and Visual Studio 2012 - Project Setup

Rate me:
Please Sign up or sign in to vote.
5.00/5 (14 votes)
17 Mar 2013CPOL8 min read 68.3K   3.5K   44  
This article describes the project setup of building a WPF sample application with Self-Tracking Entity Generator and Visual Studio 2012.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.datacontract.org/2004/07/SchoolSample.EntityModel" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/SchoolSample.EntityModel" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="http://localhost:9108/Service/SchoolService.svc?xsd=xsd3" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
  <xs:import schemaLocation="http://localhost:9108/Service/SchoolService.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:complexType name="ClientQuery">
    <xs:sequence>
      <xs:element minOccurs="0" name="CompressedExpression" nillable="true" type="xs:string" />
      <xs:element xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="IncludeList" nillable="true" type="q1:ArrayOfstring" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="ClientQuery" nillable="true" type="tns:ClientQuery" />
  <xs:complexType name="ArrayOfStudent">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Student" nillable="true" type="tns:Student" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfStudent" nillable="true" type="tns:ArrayOfStudent" />
  <xs:complexType name="Student">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:Person">
        <xs:sequence>
          <xs:element minOccurs="0" name="EnrollmentDate" nillable="true" type="xs:dateTime" />
          <xs:element minOccurs="0" name="Enrollments" nillable="true" type="tns:ArrayOfEnrollment" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Student" nillable="true" type="tns:Student" />
  <xs:complexType name="Person">
    <xs:sequence>
      <xs:element minOccurs="0" name="ChangeTracker" nillable="true" type="tns:ObjectChangeTracker" />
      <xs:element minOccurs="0" name="Name" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PersonId" type="xs:int" />
      <xs:element minOccurs="0" name="Status" type="tns:StatusEnum" />
      <xs:element minOccurs="0" name="Version" nillable="true" type="xs:base64Binary" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="Person" nillable="true" type="tns:Person" />
  <xs:complexType name="ObjectChangeTracker">
    <xs:sequence>
      <xs:element minOccurs="0" name="ComplexTypeOriginalValues" nillable="true" type="tns:ComplexTypeOriginalValuesDictionary" />
      <xs:element minOccurs="0" name="ExtendedProperties" nillable="true" type="tns:ExtendedPropertiesDictionary" />
      <xs:element minOccurs="0" name="ObjectsAddedToCollectionProperties" nillable="true" type="tns:ObjectsAddedToCollectionProperties" />
      <xs:element minOccurs="0" name="ObjectsRemovedFromCollectionProperties" nillable="true" type="tns:ObjectsRemovedFromCollectionProperties" />
      <xs:element minOccurs="0" name="OriginalValues" nillable="true" type="tns:OriginalValuesDictionary" />
      <xs:element minOccurs="0" name="State" type="tns:ObjectState" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="ObjectChangeTracker" nillable="true" type="tns:ObjectChangeTracker" />
  <xs:complexType name="ComplexTypeOriginalValuesDictionary">
    <xs:annotation>
      <xs:appinfo>
        <IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
      </xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ComplexTypeOriginalValues">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Name" nillable="true" type="xs:string" />
            <xs:element name="OriginalValue" nillable="true" type="xs:anyType" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ComplexTypeOriginalValuesDictionary" nillable="true" type="tns:ComplexTypeOriginalValuesDictionary" />
  <xs:complexType name="ExtendedPropertiesDictionary">
    <xs:annotation>
      <xs:appinfo>
        <IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
      </xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ExtendedProperties">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Name" nillable="true" type="xs:string" />
            <xs:element name="ExtendedProperty" nillable="true" type="xs:anyType" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ExtendedPropertiesDictionary" nillable="true" type="tns:ExtendedPropertiesDictionary" />
  <xs:complexType name="ObjectsAddedToCollectionProperties">
    <xs:annotation>
      <xs:appinfo>
        <IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
      </xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="AddedObjectsForProperty">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="CollectionPropertyName" nillable="true" type="xs:string" />
            <xs:element name="AddedObjects" nillable="true" type="tns:ObjectList" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ObjectsAddedToCollectionProperties" nillable="true" type="tns:ObjectsAddedToCollectionProperties" />
  <xs:complexType name="ObjectList">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="ObjectValue" nillable="true" type="xs:anyType" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ObjectList" nillable="true" type="tns:ObjectList" />
  <xs:complexType name="ObjectsRemovedFromCollectionProperties">
    <xs:annotation>
      <xs:appinfo>
        <IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
      </xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="DeletedObjectsForProperty">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="CollectionPropertyName" nillable="true" type="xs:string" />
            <xs:element name="DeletedObjects" nillable="true" type="tns:ObjectList" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ObjectsRemovedFromCollectionProperties" nillable="true" type="tns:ObjectsRemovedFromCollectionProperties" />
  <xs:complexType name="OriginalValuesDictionary">
    <xs:annotation>
      <xs:appinfo>
        <IsDictionary xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</IsDictionary>
      </xs:appinfo>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="OriginalValues">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Name" nillable="true" type="xs:string" />
            <xs:element name="OriginalValue" nillable="true" type="xs:anyType" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="OriginalValuesDictionary" nillable="true" type="tns:OriginalValuesDictionary" />
  <xs:simpleType name="StatusEnum">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="FullTime">
            <xs:annotation>
              <xs:appinfo>
                <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">0</EnumerationValue>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
          <xs:enumeration value="PartTime">
            <xs:annotation>
              <xs:appinfo>
                <EnumerationValue xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</EnumerationValue>
              </xs:appinfo>
            </xs:annotation>
          </xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
  <xs:element name="StatusEnum" nillable="true" type="tns:StatusEnum" />
  <xs:simpleType name="ObjectState">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="Unchanged" />
          <xs:enumeration value="Added" />
          <xs:enumeration value="Modified" />
          <xs:enumeration value="Deleted" />
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
  <xs:element name="ObjectState" nillable="true" type="tns:ObjectState" />
  <xs:complexType name="Enrollment">
    <xs:sequence>
      <xs:element minOccurs="0" name="ChangeTracker" nillable="true" type="tns:ObjectChangeTracker" />
      <xs:element minOccurs="0" name="Course" nillable="true" type="tns:Course" />
      <xs:element minOccurs="0" name="CourseId" type="xs:int" />
      <xs:element minOccurs="0" name="EnrollmentId" type="xs:int" />
      <xs:element minOccurs="0" name="Paid" type="xs:boolean" />
      <xs:element minOccurs="0" name="Student" nillable="true" type="tns:Student" />
      <xs:element minOccurs="0" name="StudentId" type="xs:int" />
      <xs:element minOccurs="0" name="Version" nillable="true" type="xs:base64Binary" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="Enrollment" nillable="true" type="tns:Enrollment" />
  <xs:complexType name="Course">
    <xs:sequence>
      <xs:element minOccurs="0" name="ChangeTracker" nillable="true" type="tns:ObjectChangeTracker" />
      <xs:element minOccurs="0" name="ClassSize" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="CourseId" type="xs:int" />
      <xs:element minOccurs="0" name="EndDate" nillable="true" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Enrollments" nillable="true" type="tns:ArrayOfEnrollment" />
      <xs:element minOccurs="0" name="Instructor" nillable="true" type="tns:Instructor" />
      <xs:element minOccurs="0" name="InstructorId" type="xs:int" />
      <xs:element minOccurs="0" name="StartDate" nillable="true" type="xs:dateTime" />
      <xs:element minOccurs="0" name="Title" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Version" nillable="true" type="xs:base64Binary" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="Course" nillable="true" type="tns:Course" />
  <xs:complexType name="ArrayOfEnrollment">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Enrollment" nillable="true" type="tns:Enrollment" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfEnrollment" nillable="true" type="tns:ArrayOfEnrollment" />
  <xs:complexType name="Instructor">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:Person">
        <xs:sequence>
          <xs:element minOccurs="0" name="Courses" nillable="true" type="tns:ArrayOfCourse" />
          <xs:element minOccurs="0" name="HireDate" nillable="true" type="xs:dateTime" />
          <xs:element minOccurs="0" name="Salary" nillable="true" type="xs:decimal" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Instructor" nillable="true" type="tns:Instructor" />
  <xs:complexType name="ArrayOfCourse">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Course" nillable="true" type="tns:Course" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfCourse" nillable="true" type="tns:ArrayOfCourse" />
  <xs:complexType name="ArrayOfInstructor">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Instructor" nillable="true" type="tns:Instructor" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfInstructor" nillable="true" type="tns:ArrayOfInstructor" />
  <xs:complexType name="DefaultFilter">
    <xs:sequence>
      <xs:element minOccurs="0" name="ChangeTracker" nillable="true" type="tns:ObjectChangeTracker" />
      <xs:element minOccurs="0" name="Filter" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ScreenName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Version" nillable="true" type="xs:base64Binary" />
    </xs:sequence>
    <xs:attribute ref="ser:Id" />
    <xs:attribute ref="ser:Ref" />
  </xs:complexType>
  <xs:element name="DefaultFilter" nillable="true" type="tns:DefaultFilter" />
</xs:schema>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Weidong has been an information system professional since 1990. He has a Master's degree in Computer Science, and is currently a MCSD .NET

Comments and Discussions