public ActionResult Create(FormCollection collection) { // TODO: Add insert logic here var v = new Client(); UpdateModel(v); repo.Add(v); return RedirectToAction("Index"); }
/// <summary> /// Deprecated Method for adding a new object to the Clients EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToClients(Client client) { base.AddObject("Clients", client); }
/// <summary> /// Create a new Client object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static Client CreateClient(global::System.Int32 id) { Client client = new Client(); client.ID = id; return client; }
public Client Update(Client e) { Save(); return e; }
public void Delete(Client e) { DB.Clients.DeleteObject(e); Save(); }
public Client Add(Client e) { DB.Clients.AddObject(e); Save(); return e; }