コード例 #1
0
        public HttpResponseMessage DeleteSourceNode([FromUri] int id)
        {
            var sourceNode = _entityLogic.GetSingle(c => c.Id == id);

            _entityLogic.Delete(sourceNode);
            return(Request.CreateResponse(HttpStatusCode.OK, StatusCodes.DELETED));
        }
コード例 #2
0
        public HttpResponseMessage DeleteChannel([FromUri] int id)
        {
            var channel = _context.Channels.SingleOrDefault(c => c.Id == id);

            var deleteSourceNode = new EntityLogic <Channel>();

            deleteSourceNode.Delete(channel);
            return(Request.CreateResponse(HttpStatusCode.OK, StatusCodes.DELETED));
        }