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)); }
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 })); }