private static void SaveComment(GeoComment geoComment) { string fileName = geoComment.Id + ".json"; string path = Path.Combine(Environment.CurrentDirectory, @"DataStore\GeoTags", fileName); File.WriteAllText(path, JsonConvert.SerializeObject(geoComment)); }
internal static GeoComment UpdateComment(Guid id, GeoComment geoComment) { geoComment.Id = id; SaveComment(geoComment); return(geoComment); }
public GeoComment Put(Guid id, [FromBody] GeoComment geoComment) { return(DataStore.DataStore.UpdateComment(id, geoComment)); }
internal static GeoComment CreateComment(GeoComment geoComment) { geoComment.Id = Guid.NewGuid(); SaveComment(geoComment); return(geoComment); }
public GeoComment Post([FromBody] GeoComment geoComment) { return(DataStore.DataStore.CreateComment(geoComment)); }