private GifEntry AssignAvailablePropertiesToDomain(GifEntryDTOProperties gifEntryProperties) { GifEntry gifEntry = new GifEntry(); gifEntry.Keyword = gifEntryProperties.Keyword; gifEntry.Url = gifEntryProperties.Url; gifEntry.UserId = gifEntryProperties.UserId; return(gifEntry); }
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)); }