EF Core 执行SqlServer系统默认@@命令
程序员文章站
2024-01-21 18:48:52
...
using (DbConnection sqlConnection = readWriteTestContext.Database.GetDbConnection())
{
sqlConnection.Open();
DbCommand sqlCommand = sqlConnection.CreateCommand();
sqlCommand.CommandText = $"select @@SERVERNAME";
Console.WriteLine(sqlCommand.ExecuteScalar());
}
上一篇: Linux下装Oracle 11G
下一篇: 详解PHP导入导出CSV文件_PHP