Ejemplo n.º 1
0
 public void InsertPerson(string name, int age)
 {
     if (_environment == "Prod")
     {
         var sqliteProvider = new SqliteProvider();
         sqliteProvider.InsertPerson("NamePerson", 40);
     }
     else
     {
         var ramProvider = new RamProvider();
         ramProvider.InsertPerson("NamePerson", 40);
     }
 }
Ejemplo n.º 2
0
        public Person GetPerson(string name)
        {
            if (_environment == "Prod")
            {
                var sqliteProvider = new SqliteProvider();
                return(sqliteProvider.GetPerson(name));
            }
            else if (_environment == "Test")
            {
                var ramProvider = new RamProvider();
                return(ramProvider.GetPerson(name));
            }
            else if (_environment == "OtherEnvironment")
            {
                var otherProvider = new OtherProvider();
                return(otherProvider.GetPerson(name));
            }

            return(null);
        }