/// <summary>
 /// Create a new cg_Destinations object.
 /// </summary>
 /// <param name="destinationId">Initial value of the DestinationId property.</param>
 public static cg_Destinations Createcg_Destinations(global::System.Int64 destinationId)
 {
     cg_Destinations cg_Destinations = new cg_Destinations();
     cg_Destinations.DestinationId = destinationId;
     return cg_Destinations;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the cg_Destinations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocg_Destinations(cg_Destinations cg_Destinations)
 {
     base.AddObject("cg_Destinations", cg_Destinations);
 }
        public ActionResult destinations_new(FormCollection collection)
        {
            var newItem = new cg_Destinations();

            // add values
            newItem.Name = collection["destinationName"];

            // add to DB & save
            db.AddTocg_Destinations(newItem);
            db.SaveChanges();

            return RedirectToAction("destinations");
        }