public async Task <ActionResult <IEnumerable <WorkExperience> > > FindByProfileAsync(Guid profileId) { if (await profileService.GetByIdAsync(profileId) == null) { return(NotFound()); } return(Ok(await workExperienceService.FindByProfileId(profileId))); }
public async Task <ActionResult <IEnumerable <WorkExperience> > > FindUserExperience(string profileId) { if (await profileService.GetByIdAsync(profileId) == null) { return(BadRequest("Profile not found.")); } var experience = await workExperienceService.FindByProfileId(profileId); if (experience.Any()) { return(Ok(experience)); } return(NotFound()); }