Esempio n. 1
0
 public ServiceInfo(string version, string environment, DateTime startTime, DatabaseInfo databaseInfo, bool canWriteToSystemLog, bool hasOwnProjectApiKey)
 {
     Version = version;
     Environment = environment;
     StartTime = startTime;
     DatabaseInfo = databaseInfo;
     CanWriteToSystemLog = canWriteToSystemLog;
     HasOwnProjectApiKey = hasOwnProjectApiKey;
 }
Esempio n. 2
0
        public DatabaseInfo GetDatabaseInfo()
        {
            try
            {
                using (var context = GetDataContext())
                {
                    var version = context.DBVersions.Max(x => x.VersionNumber);

                    var response = new DatabaseInfo(true, context.Connection.DataSource, context.Connection.Database, version);
                    return response;
                }
            }
            catch (Exception)
            {
                return new DatabaseInfo(false, null, null, -1);
            }
        }
Esempio n. 3
0
 public DatabaseInfo GetDatabaseInfo()
 {
     return _databaseInfo ?? (_databaseInfo = _repository.GetDatabaseInfo());
 }