예제 #1
0
        public void should_Read_Facilitys()
        {
            var users = _reader.Read().Result.ToList();

            Assert.True(users.Any());
            foreach (var clientFacility in users)
            {
                Console.WriteLine(clientFacility);
            }
        }
예제 #2
0
        public async Task <int> Sync()
        {
            var clientFacilities = await _clientFacilityReader.Read();

            var practices = Mapper.Map <List <Practice> >(clientFacilities);
            int count     = practices.Count;

            foreach (var practice in practices)
            {
                practice.MakeFacility();
            }

            _practiceRepository.Sync(practices);
            return(count);
        }