public CarForm() { InitializeComponent(); ModelBox.Items.AddRange(EntityContextSingleton.GetModels().ToArray()); ManufacturerBox.Items.AddRange(EntityContextSingleton.GetManufacturers().ToArray()); CategoryBox.Items.AddRange(EntityContextSingleton.GetCategories().ToArray()); ColorBox.Items.AddRange(EntityContextSingleton.GetColorCodes().ToArray()); DriveTypeBox.Items.AddRange(EntityContextSingleton.GetTypesOfDrive().ToArray()); NameBox.Items.AddRange(EntityContextSingleton.GetNames().Distinct().ToArray()); MiddleNameBox.Items.AddRange(EntityContextSingleton.GetMiddleNames().Distinct().ToArray()); LastNameBox.Items.AddRange(EntityContextSingleton.GetLastNames().Distinct().ToArray()); TypeOfEngine.Items.AddRange(EntityContextSingleton.GetEngines().Distinct().ToArray()); _controller = new CarFormContoroller(new StandartDialogService()); }
public IEnumerable <string> GetNames() { return(EntityContextSingleton.GetNames()); }