예제 #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')"
            });
        }
예제 #2
0
 public void SetUp()
 {
     country = new Country();
 }
예제 #3
0
 public CountryViewModel(Country country)
 {
     this.Country = country;
 }
예제 #4
0
 public Task<Country> GetCountryByIdAsync(Country country)
 {
     return Task.Run(() => GetCountryById(country));
 }
예제 #5
0
 public abstract Country GetCountryById(Country country);
예제 #6
0
 public Country GetCountryById(Country country)
 {
     return bl.GetCountryById(country);
 }
예제 #7
0
 public override Country GetCountryById(Country country)
 {
     return dalFactory.CreateCountryDAO(db).GetById(country.Id);
 }
예제 #8
0
 public static bool IsEqualTo(this Country c1, Country c2)
 {
     return c1.Id == c2.Id
         && c1.Name == c2.Name;
 }