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")); }
public async Task <SyncJobCompositeModel> MakeSyncJobCompositeModelAsync(SyncModel syncModel) { var instance = await _instanceRepository.GetByIdAsync(syncModel.InstanceId); return(new SyncJobCompositeModel { SyncModel = syncModel, InstanceModel = instance }); }
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)); }
public Task <InstanceModel> GetById(int id) { return(_dataAdapter.GetByIdAsync(id)); }