public static async Task <Location> InsertLocation(ConnectionFactory connectionFactory, Country country = null) { ILocationDao locationDao = new LocationDao(connectionFactory); country ??= await CountryDaoTests.InsertCountry(connectionFactory); Location location = new Location { Name = "Kitzbühel", Country = country, }; location.Id = await locationDao.Insert(location); return(location); }
public static async Task <Skier> InsertSkier(ConnectionFactory connectionFactory, Country country = null) { ISkierDao skierDao = new SkierDao(connectionFactory); country ??= await CountryDaoTests.InsertCountry(connectionFactory); Skier skier = new Skier { FirstName = "John", LastName = "Doe", Birthdate = DateTime.Today, Gender = Gender.Male, Country = country, PictureUrl = "http://fb.me/john.jpg", Archived = false, }; skier.Id = await skierDao.Insert(skier); return(skier); }