示例#1
0
        public ModelNavigator(LabSystemsContextFactory contextFactory)
        {
            // Not great, I know. Think of a cleaner way...
            string fullType = contextFactory.CreateDbContext().LabSystems.EntityType.Name;

            SelectedModelType = fullType.Substring(fullType.LastIndexOf('.') + 1);
        }
示例#2
0
        public LabSystemViewModel(LabSystemsContextFactory contextFactory)
        {
            _service = new LabSystemService(contextFactory);

            RefreshCommand = new AsyncCommand(async() =>
            {
                Systems.Clear();
                IsNotScanning = false;

                Task <IEnumerable <LabSystem> > task = _service.GetAll();

                await task;

                foreach (LabSystem system in task.Result)
                {
                    Systems.Add(system);
                }

                IsNotScanning = true;
            });
        }
示例#3
0
 public DiskDriveService(LabSystemsContextFactory contextFactory) : base(contextFactory)
 {
 }
示例#4
0
 public LabSystemService(LabSystemsContextFactory contextFactory) : base(contextFactory)
 {
 }
示例#5
0
 public GenericDataService(LabSystemsContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }