private void LoadDataSource() { var services = new SatuanServices(new SatuanRepository(), new ModelDataAnnotationCheck()); var listSatuans = services.GetAll().ToList(); if (listSatuans != null && listSatuans.Count > 0) { comboBox.Items.AddRange(listSatuans.ToArray()); comboBox.DisplayMember = "nama"; comboBox.SelectedIndex = 0; } }
public SatuanServicesFixture() { Model = new SatuanModel(); Services = new SatuanServices(null, new ModelDataAnnotationCheck()); }