public void Refresh() { Clear(); var artists = (from i in _dbref.FindAll() orderby i.Artist ascending select i.Artist).Distinct(); Artists.AddRange(artists); var albums = (from i in _dbref.FindAll() orderby i.Album ascending select i.Album).Distinct(); Albums.AddRange(albums); var geneires = (from i in _dbref.FindAll() orderby i.Generire ascending select i.Generire).Distinct(); Geneires.AddRange(geneires); var years = (from i in _dbref.FindAll() orderby i.Year ascending select i.Year).Distinct(); Years.AddRange(years); }
public void RestoreFrom(Cache ci) { Clear(); Albums.AddRange(ci.Albums); Artists.AddRange(ci.Artists); Years.AddRange(ci.Years); Geneires.AddRange(ci.Geneires); }