Ejemplo n.º 1
0
        public async Task <HttpResponseMessage> Update([FromUri] int id, [FromBody] EditComponentModel model)
        {
            Log.Out.BeginInfo(model.ToJson(), "UpdateComponent Id: {0}", id);
            await Service.Get <ITemplateService>().UpdateComponent(id, model);

            Log.Out.EndInfo("UpdateComponent Id: {0}", id);
            return(Request.CreateResponse(HttpStatusCode.OK));
        }
Ejemplo n.º 2
0
        public async Task <HttpResponseMessage> Add([FromBody] EditComponentModel model)
        {
            Log.Out.BeginInfo(model.ToJson(), "AddComponent");
            var id = await Service.Get <ITemplateService>().AddComponent(model);

            Log.Out.EndInfo("AddComponent Id: {0}", id);
            return(Request.CreateResponse(HttpStatusCode.OK, new { Id = id }));
        }