/// <summary>
 /// Create a new Client object.
 /// </summary>
 /// <param name="clientID">Initial value of the ClientID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="representative">Initial value of the Representative property.</param>
 /// <param name="phoneNumber">Initial value of the PhoneNumber property.</param>
 public static Client CreateClient(global::System.Int32 clientID, global::System.String name, global::System.String representative, global::System.String phoneNumber)
 {
     Client client = new Client();
     client.ClientID = clientID;
     client.Name = name;
     client.Representative = representative;
     client.PhoneNumber = phoneNumber;
     return client;
 }
        public ActionResult CreateDialog(Client newClient)
        {
            if (!ModelState.IsValid)
                return View();

            try
            {
                _dataModel.AddToClients(newClient);
                _dataModel.SaveChanges();

                return RedirectToAction("Create", "Project");
            }
            catch
            {
                return View();
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Clients EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToClients(Client client)
 {
     base.AddObject("Clients", client);
 }