public IActionResult GetAllProfiles() { AllProfileResponse _reponse = _applicationProfileService.GetProfiles(); if (_reponse.Success == true) { return(Ok(_reponse.profiles.Select(u => new { u.Email }))); } else { return(BadRequest(_reponse.Message)); } }
/// <summary> /// Get all profile /// </summary> /// <returns></returns> public AllProfileResponse GetProfiles() { var _reponse = new AllProfileResponse(); try { _reponse.profiles = _userProfileService.GetUserProfiles(); _reponse.Success = _userProfileService.Success; _reponse.Message = _userProfileService.Message; return(_reponse); } catch (Exception ex) { _reponse.Success = false; _reponse.Message = "Failed - " + ex.Message; return(null); } }