/// <summary> /// Updates an existing point with the information in the provided point object. /// </summary> /// <param name="point">Point with new information to be stored.</param> public void updatePoint(Point point) { Point oldPoint = db.Point.Find(point.pointID); oldPoint.GPSCoordX = point.GPSCoordX; oldPoint.GPSCoordY = point.GPSCoordY; oldPoint.name = point.name; db.SaveChanges(); }
/// <summary> /// Records the creation of a new point for the current organization. /// </summary> /// <param name="point">Point to save.</param> public void saveNewPoint(Point point) { point.organization = this._org; db.Point.Add(point); db.SaveChanges(); }