public ICollection <Doctor> GetListByDepartment(GetListByDepartmentRequest request)
        {
            var query = db.Doctors.AsQueryable();

            if (request.DepartmentId == 0)
            {
                return(query.ToList());
            }

            query = query.Where(x => x.DepartmentId == request.DepartmentId);

            return(query.ToList());
        }
        public ICollection <Doctor> GetDoctorListByDepartment(GetListByDepartmentRequest request)
        {
            var query = db.Doctors.AsQueryable();

            if (request.DepartmentId == 0)
            {
                return(query.ToList());
            }

            query = query.Where(x => x.DepartmentId == request.DepartmentId);

            var doctorList = query.ToList();

            return(getOpenSlotByDoctorPerGivenDate(doctorList,
                                                   new GetAppointmentSlotListRequest {
                AppointmentDate = request.AppointmentDate ?? DateTime.Now.Date.AddDays(1)
            },
                                                   doctorList.Select(x => x.Id).ToList()));
        }