Example #1
0
        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));
        }
Example #2
0
 internal static GeoComment UpdateComment(Guid id, GeoComment geoComment)
 {
     geoComment.Id = id;
     SaveComment(geoComment);
     return(geoComment);
 }
Example #3
0
 public GeoComment Put(Guid id, [FromBody] GeoComment geoComment)
 {
     return(DataStore.DataStore.UpdateComment(id, geoComment));
 }
Example #4
0
 internal static GeoComment CreateComment(GeoComment geoComment)
 {
     geoComment.Id = Guid.NewGuid();
     SaveComment(geoComment);
     return(geoComment);
 }
Example #5
0
 public GeoComment Post([FromBody] GeoComment geoComment)
 {
     return(DataStore.DataStore.CreateComment(geoComment));
 }