Esempio n. 1
0
        public void CreateGeoPoint()
        {
            GeoPoint g = new GeoPoint {
                Id = 3, ActivityId = 2, Latitude = 36, Longitude = 37
            };
            long gID = geoPointService.CreateGeoPoint(g).Result;

            Assert.AreEqual(g.Id, gID);
        }
Esempio n. 2
0
        public async Task <IHttpActionResult> PostGeoPoint(GeoPoint point)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await _geoPointService.CreateGeoPoint(point);

            return(CreatedAtRoute("DefaultApi", new { id = point.Id }, point));
        }