public void Update(Client client) { var oldClient = Client.Clients.FirstOrDefault(n => n.Id == client.Id); if (oldClient == null) { throw new Exception("Client doesn't exist"); } oldClient.Email = client.Email; oldClient.Name = client.Name; }
public Client Save(Client client) { client.Id = Guid.NewGuid(); Client.Clients.Add(client); return client; }
public void Remove(Client client) { Client.Clients.Remove(client); }