예제 #1
0
        public void HandleMessage(string content)
        {
            var geoModel = JsonSerializer.Deserialize <GeoLocalisationModel>(content);
            var entity   = _factory.ToEntities(geoModel);

            _context.GeoLocalisation.Add(entity);
            _context.SaveChanges();
        }
        public ActionResult Post([FromBody] GeoLocalisationModel model)
        {
            var entity = _factory.ToEntities(model);

            _context.GeoLocalisation.Add(entity);
            _context.SaveChanges();

            return(new OkResult());
        }