Example #1
0
        public async Task CreateVisitAsync(VisitDTO visitDTO)
        {
            if (visitDTO == null)
            {
                throw new ArgumentNullException(nameof(visitDTO), "Visit is null");
            }

            var visit = _mapper.Map <Visit>(visitDTO);
            await _visitRepository.CreateVisitAsync(visit);

            await _visitRepository.SaveAsync();
        }