EntityContainer 요소(SSDL)

SSDL(저장소 스키마 정의 언어)로 정의된 EntityContainer는 EDM(엔터티 데이터 모델)을 사용하여 정의되는 개체 모델을 기반으로 빌드된 응용 프로그램에 대한 데이터를 보관하는 컨테이너를 설명하는 메타데이터입니다. 일반적으로 EntityContainer는 SQL Server와 같은 RDMS(관계형 데이터베이스 관리 시스템)의 데이터베이스입니다.

SSDL 스키마의 네임스페이스 이름과 네임스페이스에 포함된 EntityContainer 요소는 CSDL(개념 스키마 정의 언어) 스키마의 해당 네임스페이스 이름과 네임스페이스에 포함된 EntityContainer 요소에 매핑됩니다. XML 계층 구조에서 EntityContainer 요소는 EntityContainer가 스키마에 정의되었더라도 Schema 요소와 별개입니다. 이는 엔터티 컨테이너를 저장소에 매핑할 때 중요한 내용입니다. 매핑 파일에서 EntityContainer의 정규화된 이름에는 스키마 네임스페이스 이름이 포함되지 않습니다.

EntityContainer 매핑에 대한 자세한 내용은 EntityContainerMapping 요소(MSL)를 참조하십시오.

SSDL 구문은 EDM을 기반으로 하는 응용 프로그램에서 사용되는 저장소 모델을 정의하는 메타데이터입니다. 다음 예제에서 선언된 EntityContainer는 데이터베이스 개체입니다. 데이터베이스 개체에 포함된 각 엔터티 집합은 Adventure Works 데이터베이스의 Human Resources 파티션에 있는 테이블을 나타냅니다. 다음 구문에는 직원, 부서, 직원 주소, 직원 이력 등에 대한 엔터티 집합이 포함됩니다. HumanResourcesEntityContainerAdventureWorksHRTarget 네임스페이스의 일부로 정의됩니다. 빌드 프로세스 중에 별칭 Self가 발생할 때마다 이 네임스페이스 이름으로 확장됩니다.

  <EntityContainer Name="HumanResources">
    <EntitySet Name="Department" EntityType="Self.Department" />
    <EntitySet Name="Employee" EntityType="Self.Employee" />
    <EntitySet Name="EmployeeAddress" EntityType="Self.EmployeeAddress" />
    <EntitySet Name="EmployeeDepartmentHistory"
                    EntityType="Self.EmployeeDepartmentHistory" />
    <EntitySet Name="EmployeePayHistory"
                              EntityType="Self.EmployeePayHistory" />
    <EntitySet Name="JobCandidate" EntityType="Self.JobCandidate" />
    <EntitySet Name="Shift" EntityType="Self.Shift" />
    <AssociationSet Name="FK_Employee_Employee_ManagerID"
        Association="Self.FK_Employee_Employee_ManagerID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="Employee1" EntitySet="Employee" />
    </AssociationSet>
    <AssociationSet Name="JobCandidate_Employee_EmployeeID"
             Association="Self.FK_JobCandidate_Employee_EmployeeID">
      <End Role="Employee" EntitySet="Employee" />
      <End Role="JobCandidate" EntitySet="JobCandidate" />
    </AssociationSet>
  </EntityContainer>

EntityContainer에 정의된 엔터티 집합 및 연결 집합에 대한 자세한 내용은 이 단원의 다음 항목을 참조하십시오.

Name 특성(EntityContainer SSDL)

EntitySet 요소(EntityContainer SSDL)

AssociationSet 요소(EntityContainer SSDL)

참고 항목

개념

엔터티 집합(EDM)
연결 집합(EDM)
EntityContainerMapping 요소(MSL)
AdventureWorks 전체 모델(EDM)