public void DeleteClient(Client client)
 {
     ObjectContext.ArchiveClientBasedOnId(client.Id, CurrentUserAccount().Id);
 }
        public void UpdateClient(Client currentClient)
        {
            currentClient.LastModified = DateTime.UtcNow;
            currentClient.LastModifyingUserId = CurrentUserAccount().Id;

            this.ObjectContext.Clients.AttachAsModified(currentClient);
        }
 /// <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);
 }
 public void InsertClient(Client client)
 {
     if ((client.EntityState != EntityState.Detached))
         this.ObjectContext.ObjectStateManager.ChangeObjectState(client, EntityState.Added);
     else
         this.ObjectContext.Clients.AddObject(client);
 }
 /// <summary>
 /// Create a new Client object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="createdDate">Initial value of the CreatedDate property.</param>
 public static Client CreateClient(global::System.Guid id, global::System.DateTime createdDate)
 {
     Client client = new Client();
     client.Id = id;
     client.CreatedDate = createdDate;
     return client;
 }