my code is .
class Program
{
static NorthwindEntities context = new NorthwindEntities();
static void Main(string[] args)
{
Order updateorder = new Order() { OrderID = 10256, ShipCountry = "444", ShipCity = "tehran" };
update(updateorder);
}
static public void update(Order updateorder)
{
context.Entry<Order>(updateorder ).State = EntityState.Modified;
context.SaveChanges();
}
}
please help me , i confused why the detached entity is modified in database
the call to context.Entry<Order>(updateorder)
attaches the object to EF.