Exemple #1
0
        public void SetUp()
        {
            transaction = new TransactionScope();

            DALFactory factory = DALFactory.GetInstance();
            db = factory.CreateDatabase();
            dao = factory.CreateCountryDAO(db);

            country = new Country {
                Id = 1,
                Name = "Österreich"
            };

            runDbCommands(db, new List<string> {
                "SET FOREIGN_KEY_CHECKS=0",
                "DELETE FROM `country`",
                "INSERT INTO `country` VALUES (1, 'Österreich')",
                "INSERT INTO `country` VALUES (2, 'Belgien')"
            });
        }
Exemple #2
0
 public void SetUp()
 {
     country = new Country();
 }
 public CountryViewModel(Country country)
 {
     this.Country = country;
 }
Exemple #4
0
 public Task<Country> GetCountryByIdAsync(Country country)
 {
     return Task.Run(() => GetCountryById(country));
 }
Exemple #5
0
 public abstract Country GetCountryById(Country country);
Exemple #6
0
 public Country GetCountryById(Country country)
 {
     return bl.GetCountryById(country);
 }
Exemple #7
0
 public override Country GetCountryById(Country country)
 {
     return dalFactory.CreateCountryDAO(db).GetById(country.Id);
 }
Exemple #8
0
 public static bool IsEqualTo(this Country c1, Country c2)
 {
     return c1.Id == c2.Id
         && c1.Name == c2.Name;
 }