Beispiel #1
0
        public T Put <V>(T obj) where V : AbstractValidator <T>
        {
            Validate(obj, Activator.CreateInstance <V>());

            repository.Update(obj);
            return(obj);
        }
        public bool CriarOuAtualizarCorrentista(Correntista pCorrentista)
        {
            Validar(pCorrentista);

            var correntistaExistente = _dataset.Read().FirstOrDefault(x => x.Id == pCorrentista.Id);

            if (correntistaExistente == null)
            {
                _dataset.Create(pCorrentista);
            }
            else
            {
                _dataset.Update(pCorrentista);
            }

            return(true);
        }