예제 #1
0
        public IHttpActionResult Get(int pageId, int subPageId)
        {
            SubContentService subContentService = new SubContentService();

            var content = subContentService.GetWebContentByPageIdAndSubPageId(pageId, subPageId, db);

            return(Ok(content));
        }
예제 #2
0
        public IHttpActionResult Post([FromBody] Models.WebContent webContent)
        {
            SubContentService subContentService = new SubContentService();

            subContentService.UpsertSubContent(webContent, db);


            return(CreatedAtRoute("DefaultApi", new { id = webContent.Id }, webContent));
        }