BinaryStudio.TaskManager.Logic.Core.UserRepository.GetRoleByName C# (CSharp) Method

GetRoleByName() public method

The get role by name.
public GetRoleByName ( string userName ) : string
userName string /// The user name. ///
return string
        public string GetRoleByName(string userName)
        {
            return this.dataBaseContext.Roles.ToList().Where(it => it.Id == this.GetByName(userName).RoleId).Select(x => x.RoleName).First();
        }
    }