public async Task <IHttpActionResult> GetTherapistsByEmail([FromBody] string email)
        {
            _logger.Debug(string.Format("Begin. Email: [{0}]", email));
            var therapistRole = await NdRoleManager.FindByNameAsync(Role.Therapist.ToString());

            return(Ok(NdUserManager.Users
                      .Where(x => x.Roles.Any(y => y.RoleId == therapistRole.Id) && x.Email.Contains(email))
                      .OrderBy(x => x.FirstName).ThenBy(x => x.LastName)
                      .ToList().Select(x => _factory.CreateTherapist(x))));
        }
        public async Task <IHttpActionResult> GetTherapists()
        {
            _logger.Debug("Begin");
            var therapistRole = await NdRoleManager.FindByNameAsync(Role.Therapist.ToString());

            return(Ok(NdUserManager.Users
                      .Where(x => x.Roles.Any(y => y.RoleId == therapistRole.Id))
                      .OrderBy(x => x.FirstName).ThenBy(x => x.LastName)
                      .ToList().Select(x => _factory.CreateTherapist(x))));
        }
        public async Task <IHttpActionResult> GetTherapistInfo(string id)
        {
            _logger.Debug(string.Format("Begin. Id: [{0}]", id));
            var user = await NdUserManager.FindByIdAsync(id);

            var therapistRole = await NdRoleManager.FindByNameAsync(Role.Therapist.ToString());

            if (user != null && user.Roles.Any(x => x.RoleId == therapistRole.Id))
            {
                _logger.Debug(string.Format("User found. Id: [{0}]", id));
                return(Ok(_factory.CreateUserInfo(user)));
            }

            _logger.Debug(string.Format("Therapist was not found [id: {0}]", id));
            return(NotFound());
        }