Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
        }