public void CheckIn(int simulationsDay) { if (simulationsDay % 100 == 0) { var hamsterList = hamsterService.GetAll(); var checkInDate = Tick.simulatorDate.Add(new TimeSpan(0, -6, 0)); foreach (var hamster in hamsterList) { int areaId = GetAreaId(hamster, AreaType.Cage); if (areaId != 0) { activityLogService.Add( new ActivityLog { HamsterId = hamster.Id, ActivityId = (int)ActivityType.Arrived, StartTime = checkInDate, EndTime = checkInDate }); activityLogService.Add( new ActivityLog { HamsterId = hamster.Id, ActivityId = (int)ActivityType.Cage, AreaId = areaId, StartTime = checkInDate }); ChangeAreaStatus(areaId); } } } }