public async Task <IActionResult> Create(int id)
        {
            var currentActiveSemester = await unitOfWork.AcademicSemesters.GetCurrentAcademicSemester();

            if (currentActiveSemester == null)
            {
                return(BadRequest());
            }

            var sections = (await unitOfWork.Sections.GetSections
                            (
                                new SectionQuery
            {
                DepartmentId = id,
            }
                            )).Items;

            if (sections == null)
            {
                return(BadRequest());
            }

            foreach (var section in sections)
            {
                var sectionYear = helper
                                  .CalculateCurrentYearOfSection(Convert.ToInt32(currentActiveSemester.AcademicYear.EtYear), section.EntranceYear);

                var courses = await unitOfWork.Courses
                              .GetCoursesForCurrentSemester(sectionYear, currentActiveSemester.Semester, section.CurriculumId);

                foreach (var course in courses)
                {
                    if (!unitOfWork.CourseOfferings.DoesCourseOfferingExist(currentActiveSemester.Id, course.Id, section.Id))
                    {
                        unitOfWork.CourseOfferings
                        .Add(CreateCourseOffering(course, section, currentActiveSemester));
                    }
                }
            }

            await unitOfWork.CompleteAsync();

            var courseOfferings = await unitOfWork.CourseOfferings.GetCourseOfferingsWithRelatedData(new CourseOfferingQuery());

            var result = mapper.Map <IEnumerable <CourseOffering>, IEnumerable <CourseOfferingResource> >(courseOfferings.Items);

            return(Ok(result));
        }