public ClaimsIdentity CreateTeacherIdentity(TeacherSet user) { var identity = new ClaimsIdentity(new[] { new Claim(ClaimTypes.Name, user.Name + " " + user.Surname), new Claim(ClaimTypes.Sid, user.Id.ToString()), new Claim(ClaimTypes.Role, "Teacher"), new Claim(ClaimTypes.Email, user.Email) }, "ApplicationCookie"); return(identity); }
public TeacherSetDTO(TeacherSet teacher) : base() { this.Id = teacher.Id; this.MidleName = teacher.MidleName; this.MobilePhone = teacher.MobilePhone; this.Name = teacher.Name; this.Surname = teacher.Surname; this.WorkPhone = teacher.WorkPhone; this.Email = teacher.Email; //StudySubjectSetIDS = teacher.StudySubjectSets.Select(x => x.Id); }