public void EditTeacher(TeacherEntity teacher)
        {
            TeachersRepository teachRepo = new TeachersRepository();

            using (var uow = UnitOfWork.CreateUoW())
            {
                try
                {
                    teachRepo.Update(EntitiesMapper.ToDbModel(teacher), uow);
                    uow.ApplyChanges();
                }
                catch (Exception ex)
                {
                    DbLog.LogError("Error editing teacher " + teacher, ex);
                    throw ex;
                }
            }
        }
        public void EditEnrollment(EnrollmentEntity enroll)
        {
            EnrollmentsRepository enrollRepo = new EnrollmentsRepository();

            using (var uow = UnitOfWork.CreateUoW())
            {
                try
                {
                    enrollRepo.Update(EntitiesMapper.ToDbModel(enroll), uow);
                    uow.ApplyChanges();
                }
                catch (Exception ex)
                {
                    DbLog.LogError("Error editing enrollment " + enroll, ex);
                    throw ex;
                }
            }
        }
        public void EditResource(ResourceEntity resource)
        {
            ResourcesRepository resRepo = new ResourcesRepository();

            using (var uow = UnitOfWork.CreateUoW())
            {
                try
                {
                    resRepo.Update(EntitiesMapper.ToDbModel(resource), uow);
                    uow.ApplyChanges();
                }
                catch (Exception ex)
                {
                    DbLog.LogError("Error editing resource " + resource, ex);
                    throw ex;
                }
            }
        }
        public void EditCourse(CourseEntity course)
        {
            CoursesRepository courseRepo = new CoursesRepository();

            using (var uow = UnitOfWork.CreateUoW())
            {
                try
                {
                    courseRepo.Update(EntitiesMapper.ToDbModel(course), uow);
                    uow.ApplyChanges();
                }
                catch (Exception ex)
                {
                    uow.Rollback();
                    DbLog.LogError("Error editing course " + course, ex);
                    throw ex;
                }
            }
        }
        public void InsertResource(ResourceEntity res)
        {
            ResourcesRepository resRepo = new ResourcesRepository();

            using (var uow = UnitOfWork.CreateUoW())
            {
                try
                {
                    resRepo.Create(EntitiesMapper.ToDbModel(res), uow);
                    uow.ApplyChanges();
                }
                catch (Exception ex)
                {
                    uow.Rollback();
                    DbLog.LogError("Error inserting resource " + res, ex);
                    throw ex;
                }
            }
        }