public Point AddPoint(TEntity area, Point point)
 {
     try
     {
         var bound = GetBound(area);
         if (bound == null)
         {
             return(null);
         }
         point.BoundId = bound.Id;
         //p1.Bound = Bound;
         var  dbPoint = point.ToDbModel();
         bool r       = db.Points.Add(dbPoint);
         if (r)
         {
             point.Id = dbPoint.Id;
             bound.AddPoint(point);
             return(point);
         }
         else
         {
             return(null);
         }
     }
     catch (System.Exception ex)
     {
         Log.Error(tag, "AddPoint", ex.ToString());
         return(null);
     }
 }
        public Point AddPoint(TEntity area, Point point)
        {
            var bound = GetBound(area);

            if (bound == null)
            {
                return(null);
            }
            point.BoundId = bound.Id;
            //p1.Bound = Bound;
            var  dbPoint = point.ToDbModel();
            bool r       = db.Points.Add(dbPoint);

            if (r)
            {
                point.Id = dbPoint.Id;
                bound.AddPoint(point);
                return(point);
            }
            else
            {
                return(null);
            }
        }