public string GetCollectionNameById(int id)
        {
            var query = (from r in edm.CollectionPoints where r.CollectionID == id select r);
            CollectionPoint cp = new CollectionPoint();
            cp = query.First<CollectionPoint>();
            string name = cp.Place;

            return name;
        }
        public int GetCollectionIdByName(string name)
        {
            var query = (from r in edm.CollectionPoints where r.Place.Equals(name) select r);
            CollectionPoint cp = new CollectionPoint();
            cp = query.First<CollectionPoint>();
            int id = cp.CollectionID;

            return id;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the CollectionPoints EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCollectionPoints(CollectionPoint collectionPoint)
 {
     base.AddObject("CollectionPoints", collectionPoint);
 }
 /// <summary>
 /// Create a new CollectionPoint object.
 /// </summary>
 /// <param name="collectionID">Initial value of the CollectionID property.</param>
 /// <param name="place">Initial value of the Place property.</param>
 public static CollectionPoint CreateCollectionPoint(global::System.Int32 collectionID, global::System.String place)
 {
     CollectionPoint collectionPoint = new CollectionPoint();
     collectionPoint.CollectionID = collectionID;
     collectionPoint.Place = place;
     return collectionPoint;
 }