public List <AffiliateDTO> GetAll()
        {
            var affiliates = _context.Affiliates
                             .Include(a => a.Address)
                             .Select(a => AffiliateMapper.AffiliateToDTO(a))
                             .ToList();

            return(affiliates);
        }
        public AffiliateDTO Get(int id)
        {
            var affiliate = _context.Affiliates.Include(a => a.Address).SingleOrDefault(a => a.Id.Equals(id));

            if (affiliate is null)
            {
                return(null);
            }

            return(AffiliateMapper.AffiliateToDTO(affiliate));
        }