Esempio n. 1
0
        private GifEntry AssignAvailablePropertiesToDomain(GifEntryDTOProperties gifEntryProperties)
        {
            GifEntry gifEntry = new GifEntry();

            gifEntry.Keyword = gifEntryProperties.Keyword;
            gifEntry.Url     = gifEntryProperties.Url;
            gifEntry.UserId  = gifEntryProperties.UserId;

            return(gifEntry);
        }
Esempio n. 2
0
        public HttpResponseMessage PostGifEntry(GifEntryDTOProperties gifEntry)
        {
            if (!ModelState.IsValid)
            {
                ServiceResponseBase exResp = new InsertGifEntryResponse();
                exResp.Exception = new ArgumentException("ModelState invalid.");
                return(Request.BuildResponse(exResp));
            }

            InsertGifEntryResponse insertGifEntryResponse = _gifEntryService.InsertGifEntry(
                new InsertGifEntryRequest()
            {
                GifEntryDTOProperties = gifEntry
            });

            return(Request.BuildResponse(insertGifEntryResponse));
        }