I don't follow:
var refreshedSched = newTicket.Schedules
.FirstOrDefault(s => CompareSchedules(s, sched));
if (refreshedSched != null)
{
if (refreshedSched.ScheduleExtension == null)
refreshedSched.ScheduleExtension = new ScheduleExtension();
refreshedSched.ScheduleExtension.RTUpdateCurrent
= sched.ScheduleExtension.RTUpdateCurrent;
}
Schedule and ScheduleExtension have a One to One association on Schedule.ID=ScheduleExtension.ScheduleID, and when I try to assign a new ScheduleExtension to a Schedule it wants to change the Schedule's ID column to 0...
Why would it do that?