gpt4 book ai didi

c# - 在运行时打印 EntityFramework 版本

转载 作者:太空狗 更新时间:2023-10-30 01:21:20 27 4
gpt4 key购买 nike

有没有办法在运行时获取 EF 的版本?类似于

Console.WriteLine(Environment.Version);

会回来

4.0.30319.18034

最佳答案

扩展Alexei的想法,你可以做到

string version = typeof(DbSet).Assembly.GetName().Version.ToString();

关于c# - 在运行时打印 EntityFramework 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15994469/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com