private string GetDataSource() { string connectionString = UserIdentity.GetConnectionString(); if (!string.IsNullOrEmpty(connectionString)) { var sqlConnectionStringBuilder = new SqlConnectionStringBuilder(connectionString); return(sqlConnectionStringBuilder.DataSource); } return(string.Empty); }