Exemple #1
0
        public ProfileInfoDto GetProfileInfo()
        {
            var userId = repository.UserId;

            var employee = repository.All()
                           .Include(e => e.Department)
                           .Include(e => e.EmployeePosition)
                           .Include(e => e.AspUser)
                           .FirstOrDefault(u => u.Id == userId);

            var userRole = userManager.GetRolesAsync(employee.AspUser).Result[0];

            var result = new ProfileInfoDto()
            {
                Department  = employee.Department?.Name,
                Position    = employee.EmployeePosition?.Name,
                Description = employee.PersonalDescription,
                Projects    = GetUserProjects(userId),
                Email       = employee.AspUser.Email,
                Role        = userRole
            };

            return(result);
        }
Exemple #2
0
 public bool EditProfileInfo(int Id, ProfileInfoDto value)
 {
     throw new NotImplementedException();
 }
Exemple #3
0
 public bool AddProfileInfo(ProfileInfoDto profileInfoDto)
 {
     throw new NotImplementedException();
 }