I want to inactivate rows instead of deleting them.
My current Code deletes the character. Instead I want to set column IsActive to 0 (false)
[HttpPost, ActionName("Delete")]
public ActionResult DeleteConfirmed(int id)
{
Character character = db.Characters.Find(id);
db.Characters.Remove(character);
db.SaveChanges();
return RedirectToAction("Index");
}
Table Definition:
CharacterID int
isActive bit
UserId uniqueidentifier
If you used a generated .edmx, isActive should be set to a boolean.