示例#1
0
        public DataLayerTests()
        {
            var builder = new DbContextOptionsBuilder <FavoriteStationsContext>();

            builder.UseSqlServer(@"Server=localhost\SQLEXPRESS;Database=favorite-stations;Trusted_Connection=True;");
            this.dbContext = new FavoriteStationsContext(builder.Options);
            this.dataLayer = new DataLayer(dbContext);
        }
 public DataLayer(FavoriteStationsContext dbContext)
 {
     this.dbContext = dbContext;
 }