Exemplo n.º 1
0
 public void SetUp()
 {
     _jsonString = JsonConvert.SerializeObject(GetTestInstances());
     _fakeLocalPersistanceHelper = Mock.Of <ILocalPersistanceHelper>();
     Mock.Get(_fakeLocalPersistanceHelper).Setup(o => o.GetData())
     .Returns(_jsonString);
     _repo = new PeopleRepo(_fakeLocalPersistanceHelper);
 }
 public BoProvider(
     SecretGardenContext context
     , IMapper mapper
     , PeopleRepo peopleRepo
     , IDistributedCache cache)
 {
     _context    = context;
     _mapper     = mapper;
     _peopleRepo = peopleRepo;
     _cache      = cache;
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            var repo   = new PeopleRepo();
            var people = repo.GetAll();

            foreach (var person in people)
            {
                Console.WriteLine(person);
                //WriteInforMessageToDisplay(person.FullName);
                //Debug.WriteLine($"Outputing - {person.FullName}");
            }

            Console.WriteLine("Done");
            Console.ReadKey();
        }
Exemplo n.º 4
0
 // GET: people
 public PeopleController()
 {
     dBContext        = new MongoConnect();
     peopleCollection = dBContext.database.GetCollection <PeopleMod>("people");
     peopleRepo       = new PeopleRepo();
 }