Example #1
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,NombreJugador,Valoracion,Pais,Dorsal")] Jugador jugador)
        {
            if (ModelState.IsValid)
            {
                db.Entry(jugador).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(jugador));
        }
Example #2
0
 public virtual void Update(T obj)
 {
     table.Attach(obj);
     _context.Entry(obj).State = EntityState.Modified;
 }