示例#1
0
        //Persistir o objecto e atualizar informações
        private bool atualizar(MeioPagamento OMeioPagamento)
        {
            OMeioPagamento.setDefaultUpdateValues();

            //Localizar existentes no banco
            MeioPagamento dbRegistro = this.carregar(OMeioPagamento.id);
            var           TipoEntry  = db.Entry(dbRegistro);

            TipoEntry.CurrentValues.SetValues(OMeioPagamento);
            TipoEntry.ignoreFields();

            db.SaveChanges();
            return(OMeioPagamento.id > 0);
        }