internal void UpdatePointFromVisibility(GeoCalcPoint point) { _log.DebugEx("> UpdatePoint START."); GeoCalculatiorFacade.UpdateUserSessionPoint(point); _log.DebugEx("> UpdatePoint END."); }
public void UpdateUserPoint(GeoCalcPoint point) { log.InfoEx($"UpdateUserPoint. Processing Id: {point.GuidId}"); var pointEntity = context.GeoCalcSessionPoints.FirstOrDefault(entity => entity.id == point.GuidId); if (pointEntity != null) { pointEntity.Update(point); Submit(); log.InfoEx($"GeoCalcPoint {point.GuidId} was successfully updated"); } else { pointEntity = point.Get(); context.GeoCalcSessionPoints.InsertOnSubmit(pointEntity); Submit(); log.InfoEx($"GeoCalcPoint {point.GuidId} was successfully added"); } }
public static void UpdateUserSessionPoint(GeoCalcPoint point) { log.InfoEx("> UpdateUserSessionPoint START"); if (point != null) { try { using (var accessor = new GeoCalculatorDataAccess()) { accessor.UpdateUserPoint(point); } } catch (Exception ex) { log.InfoEx("> UpdateUserSessionPoint Exception: {0}", ex.Message); } } else { log.InfoEx("UpdateUserSessionPoint point == null"); } log.InfoEx("> UpdateUserSessionPoint END"); }