System.InvalidOperationException: 'Attaching an entity of type 'leisure.Models.Sale' failed because another entity of the same type already has the same primary key value. This can happen when using the 'Attach' method or setting the state of an entity to 'Unchanged' or 'Modified' if any entities in the graph have conflicting key values. This may be because some entities are new and have not yet received database-generated key values. In this case use the 'Add' method or the 'Added' entity state to track the graph and then set the state of non-new entities to 'Unchanged' or 'Modified' as appropriate.'
Actually i m updating my table data according to other model.
Sale sal = new Sale();
var order = db.Sales.Where(s => s.Bill_Id == _Leisure.Order_id)
.FirstOrDefault();
sal.Customer_Name = order.Customer_Name;
sal.Payment_Type = "2";
sal.Org_id = order.Org_id;
sal.Staus = "Pending";
sal.Bill_Id = _Leisure.Order_id;
db.Entry(sal).State = System.Data.Entity.EntityState.Modified;
db.SaveChanges();