I have here a Vb.Net employee management application. It has employees, managers, teams, trainings and so on.
The way the application is set up now, data is read from the database in the startup form (frmMain) load event and kept in that forms public properties. After that all other forms (and there is many of them) reference those lists (list (of employee), list of (team)) usging those properties. For example
dim emp = frmMain.Employees.Find(Function(x) x.ID = 128) , or dim team1 as new Team frmMain.Teams.Add(team1)
I feel that this is a very bad way to solve this problem, but I'm stuck on deciding how this should be done.
Some singleton class that would keep all those lists (there is lots of them) instantiated on application startup, or is there a better way to do this?