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

속성

DataServiceBehavior

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

EnableTypeConversion

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

MaxBatchCount

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

MaxChangesetCount

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

MaxExpandCount

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

MaxExpandDepth

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

MaxObjectCountOnInsert

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

MaxResultsPerCollection

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

UseVerboseErrors

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

메서드

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)

적용 대상

추가 정보