public int AddParticipancy(ParticipancyDTO participancy)
        {
            Participancy newParticipancy = Mapper.Map <Participancy>(participancy);

            _context.Participancy.Add(newParticipancy);

            int result = _context.SaveChanges();

            return(result);
        }
        public bool UserWantsPublicationInThisSeason(string userId)
        {
            var currentSeason = _context.Season.Where(s => s.StartDate <DateTime.Now && s.EndDate> DateTime.Now).SingleOrDefault();

            if (currentSeason != null)
            {
                Participancy participancy = _context.Participancy.Where(p => p.UserId == userId && p.SeasonId == currentSeason.Id).SingleOrDefault();
                if (participancy != null)
                {
                    return(participancy.Publication);
                }
            }
            return(false);
        }