It appears as though you are trying to add the Register
object to a disposed context. If you are binding records to a grid then they will no longer be attached to the DB when you retrieve them, you need to re-pull the object and update that instead e.g.
using (var db = new ChildContext())
{
// get the id of the selected child
var childId = (ChildrenGrid.SelectedItem as Child).ChildId;
// pull that record from the "live" context
Child entity = db.Child.Single(x => x.ChildId == childId);
// add the new record to the "live" entity
entity.Registers.Add(new Register
{
dt_in = DateTime.Now,
dt_out = DateTime.Now
});
db.SaveChanges();
}
FYI - it's generally a better idea to use view models for your UI rather than actual DB entities.