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