コード例 #1
0
        public async Task <bool> CriarConta(Conta model)
        {
            if (_repositoryConta.GetAll().Where(x => x.NumConta == model.NumConta).Count() > 0)
            {
                throw new NumContaJaExistenteException(model.NumConta);
            }

            try
            {
                await _repositoryConta.AddAsync(model);

                await _uow.CommitAsync();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
コード例 #2
0
ファイル: AppConta.cs プロジェクト: Rafael9375/Cognizant
 public IEnumerable <Conta> GetAll()
 {
     return(repo.GetAll());
 }