public static ScheduleEntity ToEntity(this LecturerScheduleDto from)
 {
     return(new ScheduleEntity
     {
         LectureName = from.LectureName,
         LecturerFirstName = from.FirstName,
         LecturerLastName = from.LastName,
         LectureTime = from.LectureTime
     });
 }
        public IActionResult AddNewScheduleForLecturer([FromBody] LecturerScheduleDto lecturerSchduleDto)
        {
            var scheduleId = _scheduleService.AddSchedule(lecturerSchduleDto);

            return(CreatedAtAction(nameof(GetScheduleById), new { id = scheduleId }, scheduleId));
        }
 public Guid AddSchedule(LecturerScheduleDto schedule)
 {
     return(_scheduleRepository.AddSchedule(schedule.ToEntity()));
 }