public ActionResult Delete(string guid) { Response.AddHeader("Content-Type", "application/json"); AnnotationImageHandler imageHandler = Utils.createAnnotationImageHandler(); long annotationId = imageHandler.GetAnnotation(guid).Id; DeleteAnnotationResult result = imageHandler.DeleteAnnotation(annotationId); return(Content(JsonConvert.SerializeObject( result, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() } ), "application/json")); }
public ActionResult Get(string file) { Response.AddHeader("Content-Type", "application/json"); AnnotationImageHandler imageHandler = Utils.createAnnotationImageHandler(); String filename = file;// request.getParameter("file"); long annotationId = long.Parse(Request.Params["annotationId"]); DeleteAnnotationResult result = imageHandler.DeleteAnnotation(annotationId); return(Content(JsonConvert.SerializeObject( result, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() } ), "application/json")); }