Пример #1
0
        public bool AtualizarContato(Contato Entity)
        {
            bool returnAtualizarContatoCliente = false;

            using (EderTesteContext context = new EderTesteContext())
            {
                context.Contato.Attach(Entity);
                context.Entry(Entity).State = EntityState.Modified;
                context.SaveChanges();
                returnAtualizarContatoCliente = true;
            }

            return(returnAtualizarContatoCliente);
        }
Пример #2
0
        public bool AtualizarOperacao(Operacao Entity)
        {
            bool returnAtualizarOperacao = false;

            using (EderTesteContext context = new EderTesteContext())
            {
                context.Operacao.Attach(Entity);
                context.Entry(Entity).State = EntityState.Modified;
                context.SaveChanges();
                returnAtualizarOperacao = true;
            }

            return(returnAtualizarOperacao);
        }