Example #1
0
        public async Task <IllustrationDTO> UpdateAsync(IllustrationDTO objet)
        {
            Illustration entite = MapIllustration.ToEntity(objet, false);
            var          lRet   = await _repo.UpdateAsync(entite);

            return(MapIllustrationDTO.MapDataToDTO(lRet));
        }
Example #2
0
        public async Task <IllustrationDTO> CreateAsync(IllustrationDTO objet)
        {
            Illustration entite = MapIllustration.ToEntity(objet, true);

            Illustration lRet = await _repo.CreateAsync(entite);

            return(MapIllustrationDTO.MapDataToDTO(lRet));
        }
Example #3
0
        public async Task <IEnumerable <IllustrationDTO> > ListeActifAsync()
        {
            var liste = await _repo.GetAllActifAsync();

            var rtn = MapIllustrationDTO.MapDataToDTO(liste);

            return(rtn);
        }
Example #4
0
        public async Task <IEnumerable <IllustrationDTO> > SearchAsync(SearchIllustration searchParams)
        {
            var liste = await _repo.SearchAsync(searchParams);

            var rtn = MapIllustrationDTO.MapDataToDTO(liste);

            return(rtn);
        }
Example #5
0
        public async Task <IllustrationDTO> GetAsync(int id)
        {
            var objet = await _repo.GetAsync(id);

            if (null != objet)
            {
                var rtn = MapIllustrationDTO.MapDataToDTO(objet);
                return(rtn);
            }
            else
            {
                return(null);
            }
        }