Example #1
0
        public async Task <int> AddAsync(RegistrationDTO entity)
        {
            if (entity.Status)
            {
                var seminar = await seminarRepository.GetAsync(entity.SeminarId);

                seminar.ParticipantsCount++;
                await seminarRepository.UpdateAsync(seminar);
            }
            return(await registrationRepository.AddAsync(entity));
        }
Example #2
0
 public async Task <SeminarDTO> GetAsync(Guid id)
 {
     return(await seminarRepository.GetAsync(id));
 }