DataServiceConfiguration 클래스

정의

WCF Data Services의 구성을 관리합니다.

public ref class DataServiceConfiguration sealed : System::Data::Services::IDataServiceConfiguration
public sealed class DataServiceConfiguration : System.Data.Services.IDataServiceConfiguration
type DataServiceConfiguration = class
    interface IDataServiceConfiguration
Public NotInheritable Class DataServiceConfiguration
Implements IDataServiceConfiguration
상속
DataServiceConfiguration
구현

예제

이 예제에서는 선택한 엔터티 집합에 대한 액세스 권한이 부여된 Northwind 기반 데이터 서비스에 대한 코드 숨김 페이지를 보여줍니다.

public class Northwind : DataService<NorthwindEntities>
{
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(DataServiceConfiguration config)
    {
        // Grant only the rights needed to support the client application.
        config.SetEntitySetAccessRule("Orders", EntitySetRights.AllRead
             | EntitySetRights.WriteMerge
             | EntitySetRights.WriteReplace);
        config.SetEntitySetAccessRule("Order_Details", EntitySetRights.AllRead
            | EntitySetRights.AllWrite);
        config.SetEntitySetAccessRule("Customers", EntitySetRights.AllRead);
    }
}
Imports System.Data.Services
Imports System.Linq
Imports System.ServiceModel.Web

Public Class Northwind
    Inherits DataService(Of NorthwindEntities)

    ' This method is called only once to initialize service-wide policies.
    Public Shared Sub InitializeService(ByVal config As DataServiceConfiguration)
        ' Grant only the rights needed to support the client application.
        config.SetEntitySetAccessRule("Orders", EntitySetRights.AllRead _
             Or EntitySetRights.WriteMerge _
             Or EntitySetRights.WriteReplace)
        config.SetEntitySetAccessRule("Order_Details", EntitySetRights.AllRead _
            Or EntitySetRights.AllWrite)
        config.SetEntitySetAccessRule("Customers", EntitySetRights.AllRead)
    End Sub
End Class

속성

Name Description
DataServiceBehavior

DataServiceBehavior 데이터 서비스의 추가 동작을 정의하는 개체를 가져옵니다.

EnableTypeConversion

데이터 서비스 런타임이 페이로드에 포함된 형식을 요청에 지정된 실제 속성 형식으로 변환해야 하는지 여부를 가져오거나 설정합니다.

MaxBatchCount

단일 일괄 처리에서 허용되는 최대 변경 집합 및 쿼리 작업 수를 가져오거나 설정합니다.

MaxChangesetCount

단일 변경 집합에 포함할 수 있는 최대 변경 횟수를 가져오거나 설정합니다.

MaxExpandCount

연산자를 사용하여 $expand 단일 요청에 포함할 수 있는 관련 엔터티의 최대 수를 가져오거나 설정합니다.

MaxExpandDepth

단일 요청의 경로에 포함 $expand 할 수 있는 관련 엔터티의 최대 수를 얻거나 설정합니다.

MaxObjectCountOnInsert

단일 POST 요청에 포함할 수 있는 삽입할 개체의 최대 수를 가져오기 또는 설정합니다.

MaxResultsPerCollection

반환된 각 컬렉션의 최대 항목 수를 가져오거나 설정합니다.

UseVerboseErrors

데이터 서비스에서 자세한 정보 표시 오류를 반환해야 하는지 여부를 가져오거나 설정합니다.

메서드

Name Description
EnableTypeAccess(String)

사용자 지정 데이터 서비스 공급자가 사용할 수 있도록 데이터 서비스 런타임에 데이터 형식을 등록합니다.

Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
RegisterKnownType(Type)

데이터 서비스에서 인식하는 형식 목록에 형식을 추가합니다.

SetEntitySetAccessRule(String, EntitySetRights)

지정된 엔터티 집합 리소스에 대한 사용 권한을 설정합니다.

SetEntitySetPageSize(String, Int32)

엔터티 집합 리소스의 최대 페이지 크기를 설정합니다.

SetServiceOperationAccessRule(String, ServiceOperationRights)

지정된 서비스 작업에 대한 사용 권한을 설정합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보