示例#1
0
        public async Task <ActionResult <CollaborativeViewModel> > GetByMail([FromQuery] CollaborativeMailViewModel collaborativeMailViewModel)
        {
            var collabVM = await _collaborativeService.GetByMailAsync(collaborativeMailViewModel);

            if (collabVM == null)
            {
                return(NotFound());
            }

            return(Ok(collabVM));
        }
        public async Task <CollaborativeViewModel> GetByMailAsync(CollaborativeMailViewModel collaborativeMailViewModel)
        {
            var collab = _mapper.Map <CollaborativeViewModel>(await _collaborativeRepository.GetByMail(collaborativeMailViewModel.Email));

            return(collab);
        }