Example #1
0
        public int updateBairro(Enderecos endereco)
        {
            int retorno = 0;

            try
            {
                db.Entry(endereco).State = EntityState.Modified;
                retorno = db.SaveChanges();
            }
            catch (DbUpdateException ex)
            {
                throw ex;
            }

            return(retorno);
        }
Example #2
0
 int IRepositoryContext <TEntity> .Put(TEntity entityObject)
 {
     ctx.Entry(entityObject).State = EntityState.Modified;
     return(ctx.SaveChanges());
 }