示例#1
0
        private void GetEngines()
        {
            using (var unitOfWork = new UnitOfWork())
            {
                if (!Engines.Any())
                {
                    Engines.Clear();
                    Engines.Add(new Engine()
                    {
                        engine_designation = ""
                    });
                    Engines.AddRange(unitOfWork.EngineRepository.GetAll());
                }

                engineBindingSource.DataSource = Engines;
            }
        }