コード例 #1
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,Origem,Destino,ValorMin")] Valor valor)
        {
            if (ModelState.IsValid)
            {
                db.Entry(valor).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(valor));
        }
コード例 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,Origem,Destino,Tempo,Plano,ValorMinuto")] Ligacao ligacao)
        {
            if (ModelState.IsValid)
            {
                db.Entry(ligacao).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(ligacao));
        }
コード例 #3
0
 public void Update(TEntity obj)
 {
     Db.Entry(obj).State = EntityState.Modified;
     Db.SaveChanges();
 }
コード例 #4
0
 public void Update(TEntity obj)
 {
     ctx.Entry(obj).State = System.Data.Entity.EntityState.Modified;
     ctx.SaveChanges();
 }