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); }
int IRepositoryContext <TEntity> .Put(TEntity entityObject) { ctx.Entry(entityObject).State = EntityState.Modified; return(ctx.SaveChanges()); }