Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Robin Thoni 456f9366ea v0.5.1 7 anos atrás
..
Business added fs files crud; simplified ILuCrudInterface; tests; added LuPaginatedDbo helpers 7 anos atrás
Controllers fixed fs files order by; added fs files get single by id; moved test static file controller to 'uploadraw'; fs files controller refactor; fixed fs files edit by id 7 anos atrás
DataAccess fixed fs files order by; added fs files get single by id; moved test static file controller to 'uploadraw'; fs files controller refactor; fixed fs files edit by id 7 anos atrás
Dbo added fs files crud; simplified ILuCrudInterface; tests; added LuPaginatedDbo helpers 7 anos atrás
Hubs added dbo in notifications filters; made hub connection tracker thread safe 7 anos atrás
Interfaces added fs files crud; simplified ILuCrudInterface; tests; added LuPaginatedDbo helpers 7 anos atrás
Middlewares using Configure method for LuUtilsOptions; added transactions to LuEfDataAccess; updated readme; tests 7 anos atrás
Properties init 7 anos atrás
Utils added fs files crud; simplified ILuCrudInterface; tests; added LuPaginatedDbo helpers 7 anos atrás
Luticate2.Utils.xproj init 7 anos atrás
README.md using Configure method for LuUtilsOptions; added transactions to LuEfDataAccess; updated readme; tests 7 anos atrás
project.json v0.5.1 7 anos atrás

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");

    // ...
    
    //The data access classes using YourDbContext need to be added as scoped
    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());
    }, ServiceLifetime.Transient);

    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