/// <summary>
 /// 修改教师信息
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public async Task UpdateTeacher(TeacherInfo info)
 {
     try
     {
         Teachers entity = info.MapTo <Teachers>();
         await _teachersReppository.UpdateAsync(entity);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 /// <summary>
 /// 创建教师
 /// </summary>
 /// <param name="info"></param>
 /// <returns></returns>
 public async Task <Teachers> CreateTeacher(TeacherInfo info)
 {
     try
     {
         Teachers entity = info.MapTo <Teachers>();
         if (await _teachersReppository.CountAsync(s => s.TeacherName == info.TeacherName) > 0)
         {
             throw new Exception("该教师名称已存在!");
         }
         return(await _teachersReppository.InsertAsync(entity));
     }
     catch (Exception e)
     {
         throw e;
     }
 }