Esempio n. 1
0
 /// <summary>
 /// Inserts a new spot into the db.
 /// </summary>
 /// <param name="spot">The spot to add.</param>
 /// <returns>true if the spot is valid and successfully added.</returns>
 public bool Insert(Spot spot)
 {
     if (spot.Validate())
     {
         spot.SpotID = ObjectId.GenerateNewId();
         SafeModeResult result = Spots.Insert(spot);
         return true;
     }
     else return false;
 }