Пример #1
0
        public async Task <ActionResult <IEnumerable <WorkExperience> > > FindByProfileAsync(Guid profileId)
        {
            if (await profileService.GetByIdAsync(profileId) == null)
            {
                return(NotFound());
            }

            return(Ok(await workExperienceService.FindByProfileId(profileId)));
        }
Пример #2
0
        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());
        }