MeDB.WebDI 10.2.8028

dotnet add package MeDB.WebDI --version 10.2.8028                
NuGet\Install-Package MeDB.WebDI -Version 10.2.8028                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MeDB.WebDI" Version="10.2.8028" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MeDB.WebDI --version 10.2.8028                
#r "nuget: MeDB.WebDI, 10.2.8028"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MeDB.WebDI as a Cake Addin
#addin nuget:?package=MeDB.WebDI&version=10.2.8028

// Install MeDB.WebDI as a Cake Tool
#tool nuget:?package=MeDB.WebDI&version=10.2.8028                

关于 MeDB.WebDI

在ASP.NetCore的应用程序中,通过依赖注入方式轻松实现 MeDB 的连接,还将通过 service provider 注册来集成 MeDB 的日志,本包含有 NXDO.Data 依赖旨在通过 NXDO.Data 的配置信息获取对于的连接信息,非 ‘中船.11所(csss.11所)’ 的开发人员请谨慎使用本程序。

ASP.NETCore

对于ASP.NETCore, 使用本包以便使用依赖项注入和日志集成.

NXDO.WebAPI 中的示例

using MeDB.MeDBConnector;

//创建继承自 NXDO.WebAPI.ApiStartup 的启动类并重写如下方法
public override void ConfigureServices(IServiceCollection services) {
    services.AddMeDbDataSourceByNXDO(typeof(NXDO.Data.DbClient.AnyDbConnection));
    ...
    base.ConfigureServices(services);
}

public override void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime hostApplicationLifetime) {
  app.UseEndpoints(endpoints => {
      endpoints.MapGet("/hello", async ([FromServices] MeDbConnection connection) => {
          await connection.OpenAsync();
          await using var command = connection.CreateCommand();
          command.CommandText = "SELECT user_name FROM users LIMIT 1";
          var s = "MeDB欢迎您: " + await cmd.ExecuteScalarAsync();
          return Results.Ok(s);
      });
  });
}

相关程序包

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
10.2.8028 71 11/15/2024
10.1.8028 64 11/15/2024
10.0.8028 210 12/23/2023