Exemple #1
0
 public bool Add(PointModel pointModel)
 {
     using (var dbEntities = new DBEntities())
     {
         try
         {
             dbEntities.Points.Add(new Point()
                                       {
                                           UserID = 11,
                                           X = pointModel.X,
                                           Y = pointModel.Y,
                                           Z = pointModel.Z,
                                           vX = pointModel.Xv,
                                           vY = pointModel.Yv,
                                           vZ = pointModel.Zv,
                                           Date = DateTime.Now
                                       });
             dbEntities.SaveChanges();
             return true;
         }
         catch (Exception)
         {
             return false;
         }
     }
 }
Exemple #2
0
 public bool Add(PointModel pointModel)
 {
     return _iPoint.Add(pointModel);
 }