private static void UpdateDisconectedEntity() { var samurai = _context.Samurais.Include(s => s.Quotes).Single(s => s.Id == 14); var quote = samurai.Quotes.First(); quote.Text += " New One"; using (var dbNew = new SamuraiDbContext()) { dbNew.Entry(quote).State = EntityState.Deleted; dbNew.SaveChanges(); } }
public Quotes Update(Quotes quotes) { context.Entry(quotes).State = EntityState.Modified; return(quotes); }
public SecretIdentity Update(SecretIdentity secretIdentity) { context.Entry(secretIdentity).State = Microsoft.EntityFrameworkCore.EntityState.Modified; return(secretIdentity); }
public Samurai Update(Samurai samurai) { _context.Entry(samurai).State = EntityState.Modified; return(samurai); }
public Battle Update(Battle Battle) { context.Entry(Battle).State = EntityState.Modified; return(Battle); }