Beispiel #1
0
        public async Task <BasicResponse> CreateDeployment(CreateDeploymentRequest metadata)
        {
            await using var dataContext = await _dataContextFactory.Construct();

            var dataBridge = dataContext.GetDeploymentDataBridge();
            var result     = await dataBridge.CreateDeployment(metadata);

            return(new BasicResponse(result.ToString()));
        }
Beispiel #2
0
 private async Task <IPAddress> LoadIPAddress(ILogger logger)
 {
     try
     {
         using var dataContext = _dataContextFactory.Construct();
         var ipDataAccess = dataContext.GetIPAddressDataAccess();
         return(await ipDataAccess.LoadIPAddress(logger));
     }
     catch (Exception ex)
     {
         // Don't bomb when reading from file.
         logger.LogError($"Something bad happened when reading IP from file: {ex}");
     }
     return(null);
 }
Beispiel #3
0
        public async Task AddLog(AddLogRequest request)
        {
            await using var dataContext = await _dataContextFactory.Construct();

            var logsDataBridge = dataContext.GetLogsDataBridge();
            await logsDataBridge.AddLogAsync(request);
        }
        internal virtual async Task <IEnumerable <UserLocation> > GetUserLocationsAsync()
        {
            using var dataContext = _dataContextFactory.Construct();
            var dataProvider  = dataContext.GetUserLocationDataProvider();
            var userLocations = await dataProvider.GetUserLocations();

            return(userLocations);
        }