Skip to content

This nuget allows you to view table content of your ASP.NET core application during runtime

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
licence.txt
Notifications You must be signed in to change notification settings

maximgorbatyuk/MaximGorbatyuk.DatabaseSqlEndpoints

Repository files navigation

MaximGorbatyuk.DatabaseSqlEndpoints

GitHub Workflow Status Nuget GitHub release (latest by date) GitHub

This nuget allows you to view table content of your ASP.NET core application during runtime. The nuget creates a special endpoint and then return tables and data represented in html form.

Get started

  1. Install the nuget:
dotnet add package MaximGorbatyuk.DatabaseSqlEndpoints
  1. Add routing line into your Startup.cs file before UseEndpoints():
class Startup
{
    public void Configure(IApplicationBuilder app)
    {
        // ... some settings

        app
            .UseSqlEndpoints<AwesomeDbContext>() 
            .UseTableOutputEndpoint() // default route is /database-sql-endpoints/table
            .UseReadEndpoint() // default route is /database-sql-endpoints/read
            .UseExecuteEndpoint(); // default route is /database-sql-endpoints/execute

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapControllers();
        });

        // ... some settings
    }
}

Requests

1. Table content

Open https:localhost:5001/database-sql-endpoints/table?tableName=<tableName> in your browser and view your data

2. Reading some data with the SQL command

Send the following POST request:

POST https:localhost:5001/database-sql-endpoints/read

BODY:
{
    "query": "select 1;"
}

3. Execute any SQL script

Send the following POST request:

POST https:localhost:5001/database-sql-endpoints/execute

BODY:
{
    "query": "delete fronm users;"
}

About

This nuget allows you to view table content of your ASP.NET core application during runtime

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
licence.txt

Stars

Watchers

Forks

Packages

No packages published

Languages