Beispiel #1
0
        public async Task <int> Post([FromBody] CoordinatesArg arg)
        {
            _log.Information("create node {coordinates}", arg);
            using (var dbGraphContext = new DbGraphContext(_options))
            {
                var node = new DbNode {
                    Latitude = arg.Latitude, Longitude = arg.Longitude
                };
                dbGraphContext.Add(node);
                await dbGraphContext.SaveChangesAsync();

                return(node.Id);
            }
        }