Ejemplo n.º 1
0
        public async Task <IActionResult> StartSync(int id)
        {
            var instance = await _instanceRepository.GetByIdAsync(id);

            var previousSync = await _syncRepository.GetLastSuccessfulSync(id);

            var newSync = _syncModelFactory.CreateModel(id, instance.Name, previousSync);

            await _syncRepository.InsertAsync(newSync);

            return(RedirectToAction("Index", "Sync"));
        }
Ejemplo n.º 2
0
        public async Task <SyncJobCompositeModel> MakeSyncJobCompositeModelAsync(SyncModel syncModel)
        {
            var instance = await _instanceRepository.GetByIdAsync(syncModel.InstanceId);

            return(new SyncJobCompositeModel
            {
                SyncModel = syncModel,
                InstanceModel = instance
            });
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Index(int instanceId)
        {
            var instanceModel = await _instanceRepository.GetByIdAsync(instanceId);

            var spaceList = await _spaceRepository.GetAllAsync(currentPageNumber : 1, rowsPerPage : int.MaxValue, "Name", true, instanceId);

            var viewModel = new ReportingViewModel
            {
                Instance  = instanceModel,
                SpaceList = spaceList.Items
            };

            return(View(viewModel));
        }
Ejemplo n.º 4
0
 public Task <InstanceModel> GetById(int id)
 {
     return(_dataAdapter.GetByIdAsync(id));
 }