Exemple #1
0
        public object Delete(CharacteristicJunction request)
        {
            switch (request.Junction.ToLower().TrimAndPruneSpaces())
            {
            case "documentset":
                return(RemoveJunction <Characteristic, DocEntityCharacteristic, DocEntityDocumentSet, DocumentSet, DocumentSetSearch>((int)request.Id, DocConstantModelName.DOCUMENTSET, "DocumentSets", request));

            default:
                throw new HttpError(HttpStatusCode.NotFound, $"Route for characteristic/{request.Id}/{request.Junction} was not found");
            }
        }
Exemple #2
0
        public object Get(CharacteristicJunction request)
        {
            switch (request.Junction.ToLower().TrimAndPruneSpaces())
            {
            case "documentset":
                return(GetJunctionSearchResult <Characteristic, DocEntityCharacteristic, DocEntityDocumentSet, DocumentSet, DocumentSetSearch>((int)request.Id, DocConstantModelName.DOCUMENTSET, "DocumentSets", request, (ss) => HostContext.ResolveService <DocumentSetService>(Request)?.Get(ss)));

            default:
                throw new HttpError(HttpStatusCode.NotFound, $"Route for characteristic/{request.Id}/{request.Junction} was not found");
            }
        }