コード例 #1
0
        public void Delete()
        {
            if (String.IsNullOrEmpty(_requestContext.ResourceKey))
            {
                throw new RequestException("Please use a uuid predicate.");
            }
            // TODO: Check resourceKind for value None???

            Guid   uuid;
            string resourceKindName;
            ICorrelatedResSyncInfoStore correlatedResSyncInfoStore;

            // Convert resourceKey into Guid instance
            uuid             = (Guid)TypeDescriptor.GetConverter(typeof(Guid)).ConvertFrom(_requestContext.ResourceKey);
            resourceKindName = _requestContext.ResourceKind.ToString();

            // retrieve correlations from store
            correlatedResSyncInfoStore = new Sage.Integration.Northwind.Sync.StoreLocator().GetCorrelatedResSyncStore(_requestContext.SdataContext);

            // remove the correlation from store
            correlatedResSyncInfoStore.Delete(resourceKindName, uuid);
        }
コード例 #2
0
ファイル: LinkingCRUD.cs プロジェクト: Sage/SData-Contracts
        public void Delete()
        {
            if (String.IsNullOrEmpty(_requestContext.ResourceKey))
                throw new RequestException("Please use a uuid predicate.");
            // TODO: Check resourceKind for value None???

            Guid uuid;
            string resourceKindName;
            ICorrelatedResSyncInfoStore correlatedResSyncInfoStore;

            // Convert resourceKey into Guid instance
            uuid = (Guid)TypeDescriptor.GetConverter(typeof(Guid)).ConvertFrom(_requestContext.ResourceKey);
            resourceKindName = _requestContext.ResourceKind.ToString();

            // retrieve correlations from store
            correlatedResSyncInfoStore = new Sage.Integration.Northwind.Sync.StoreLocator().GetCorrelatedResSyncStore(_requestContext.SdataContext);

            // remove the correlation from store
            correlatedResSyncInfoStore.Delete(resourceKindName, uuid);
        }