Exemplo n.º 1
0
        public ActionResult activities_new(FormCollection collection)
        {
            var newItem = new cg_Activities();

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

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

            return RedirectToAction("activities");
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new cg_Activities object.
 /// </summary>
 /// <param name="activityId">Initial value of the ActivityId property.</param>
 public static cg_Activities Createcg_Activities(global::System.Int64 activityId)
 {
     cg_Activities cg_Activities = new cg_Activities();
     cg_Activities.ActivityId = activityId;
     return cg_Activities;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the cg_Activities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocg_Activities(cg_Activities cg_Activities)
 {
     base.AddObject("cg_Activities", cg_Activities);
 }