public TeacherViewModel GetTeacher()
        {
            ClaimsPrincipal principal = Request.GetRequestContext().Principal as ClaimsPrincipal;
            var             id        = principal.Claims.ToList();
            var             teacherId = id[1];
            var             teacher   = tDB.ListAll().Find(t => t.Id.Equals(Convert.ToInt32(teacherId.Value)));

            return(teacher);
        }
Example #2
0
 public List <TeacherViewModel> Get()
 {
     return(teaDB.ListAll());
 }