public async Task <HttpResponseMessage> Update([FromUri] int id, [FromBody] EditIncidentModel model) { Log.Out.BeginInfo(model.ToJson(), "UpdateIncident Id: {0}", id); await Service.Get <IManagementSevice>().UpdateIncident(id, model); Log.Out.EndInfo("UpdateIncident Id: {0}", id); return(Request.CreateResponse(HttpStatusCode.OK)); }
public async Task <HttpResponseMessage> Add([FromBody] EditIncidentModel model) { Log.Out.BeginInfo(model.ToJson(), "AddIncident"); var id = await Service.Get <IManagementSevice>().AddIncident(model); Log.Out.EndInfo("AddIncident Id: {0}", id); return(Request.CreateResponse(HttpStatusCode.OK, new { Id = id })); }