public HouseDatabase([NotNullAttribute] DbContextOptions options) : base(options) //config { if (!_created) { _created = true; Database.EnsureDeleted(); Database.EnsureCreated(); } if (Houses.ToList().Count() == 0) { loadFromCSV("kc_house_data.csv"); //load la csv ul de train } }
/// <summary> /// Gets the houses. /// </summary> /// <returns>The houses.</returns> public IList <House> GetHouses() { return(Houses.ToList()); }