コード例 #1
0
        public void NewLocation([FromBody] PlaceLocation newLocation)
        {
            newLocation.Id = Guid.NewGuid();

            _context.Add(newLocation);
            _context.SaveChanges();
        }
コード例 #2
0
        public void WeatherForecasts()
        {
            var courseInfo = new PlaceLocation()
            {
                Id       = Guid.NewGuid(),
                Name     = "Trent Lock",
                Address1 = "Lock Lane",
                PostCode = "NG10 3QB"
            };

            _context.PlaceLocation.Add(courseInfo);
            _context.SaveChanges();
        }