選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Robin Thoni 6869093f21 fixed wrapper dbo case 7年前
..
Business made all curd methods virtual 7年前
Controllers fixed wrapper dbo case 7年前
DataAccess made all curd methods virtual 7年前
Dbo fixed wrapper dbo case 7年前
Hubs added dbo in notifications filters; made hub connection tracker thread safe 7年前
Interfaces removed unused imports; added someText check; fixed crud business null check 7年前
Middlewares fixed wrapper dbo case 7年前
Properties init 7年前
Utils string to guid extension method; tests 7年前
Luticate2.Utils.xproj init 7年前
README.md v0.2.3 7年前
project.json v0.2.5 7年前

README.md

Luticate2 API Utils

Install

NuGet.Config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="rthoni" value="http://nuget.rthoni.com" protocolVersion="2" />
  </packageSources>
</configuration>

project.json

{
    ...
    dependencies": {
        "Luticate2.Utils": "0.1.*",
        ...
    }
    ...
}

appsettings.json

{
    ...
    "ConnectionStrings": {
        "default":  "User ID=POSTGRES_USER;Password=POSTGRES_PASSWORD;Host=POSTGRES_HOST;Port=5432;Database=POSTGRES_DB;Pooling=true;",
        ...
    }
    ...
}

Startup.cs

public void ConfigureServices(IServiceCollection services)
{
    // ...

    // MUST be before addMvc()
    services.AddLuticateUtils(options => options.Version = "dev");

    // ...

    services.AddDbContext<YourDbContext>(options => // Replace YourDbContext with your own database context
    {
        options.UseNpgsql(Configuration.GetConnectionString("default"));
        options.UseInternalServiceProvider(new ServiceCollection()
            .AddEntityFrameworkNpgsqlLuticate() // MUST be before AddEntityFrameworkNpgsql()
            .AddEntityFrameworkNpgsql()
            .BuildServiceProvider());
    });

    services.AddMvc()
        .AddLuticateUtils();
        
    // ...
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
    // ...

    // MUST be before useMvc()
    app.UseLuticateUtils();

    // ...
}

Usage

See WebApiUtils for an example

NuGet Deployment

  • Set version in project.json

  • Build package: dotnet pack --configuration Release

  • Deploy package: nuget push -Source http://nuget.rthoni.com bin/Release/Luticate2.Utils.VERSION.nupkg