Beispiel #1
0
        public async Task <int> AddAsync(ContaCorrente.Model.Client client)
        {
            var newClient = await Uow.Clients.AddAsync(client);

            Uow.Commit();

            return(newClient);
        }
Beispiel #2
0
        public async Task <int> UpdateAsync(ContaCorrente.Model.Client client)
        {
            Client clientToUpdate = await Uow.Clients.FindAsync(c => c.Id == client.Id);

            if (clientToUpdate == null)
            {
                throw new ArgumentNullException("Client");
            }

            var newClient = await Uow.Clients.UpdateAsync(client);

            this.Uow.Commit();
            return(newClient);
        }