public IActionResult GetTeacher(Guid guid) { var userId = Convert.ToInt32(User.Claims.Where(c => c.Type == ClaimTypes.Name).Select(c => c.Value) .SingleOrDefault()); if (userId > 0) { var user = _kullaniciService.GetById(userId); ViewBag.YetkiId = user.YetkiId; ViewBag.UserId = user.Id; } TeacherLessonCO model = new TeacherLessonCO(); var teacher = _kullaniciService.GetByTeacher(guid); if (teacher == null) { return(View("Error")); } var lessons = _tutorLessonService.GetByLessons(guid); model.Kullanici = teacher; model.TutorLesson = lessons; return(View(model)); }