コード例 #1
0
        public JsonResult DeleteLocation([FromBody] Location location)
        {
            Location dbLocation = _context.locations.SingleOrDefault(l => l.LocationId == location.LocationId);

            _context.Remove(dbLocation);
            _context.SaveChanges();

            return(Json(new{ Success = true }));
        }