RestApiDapper
loading...

Visual Studio REST API .NET Core Dapper Extensions or How To Quickly Create .NET Dapper REST API

RestApi .NET Dapper Projects

Overview and updates

RestApi Dapper is a solution template VS2017/VS2019/VS2022(VS2022 Community required for .NET6) extension for building .NET Core API Dapper solutions.

Features:

  • Three layers: Api, Domain and Entity
  • Automapper
  • DI (.NET Core feature)
  • UnitOfWork
  • Generic Service and Repository with Dapper ORM
  • Sync and Async calls
  • Generic exception handler
  • Serilog logging with Console and File sinks
  • FluentMigrator runner migration and seed
  • JWT authorization and authentication
  • Implemented IdentityServer4 with an OpenID Connect and OAuth 2.0 framework for ASP.NET Core 2.
  • Swagger and Swashbuckle with ASP.NET Core 2
  • XUnit tests run for real database
  • Postman API tests for import as json file
  • LazyCache caching option for API service calls

Updates .NET Core:

Updates .NET 8:LTS version

  • NEXT 8.0.0 (.NET 8 - Initial) .NET Core 6.0 version upgraded to .NET 8.0
  • NEXT (Added scaffolding to .NET Blazor client test project connected to RESTAPI)
  • NEXT (Add scaffolding to build bicep scripts for Azure RESTAPI deployment driven by appsettings)
  • NEXT (Add scaffolding to .NET Maui client test project connected to RESTAPI)
NOTE: Visual Studio 2022 (v.17) required

Updates .NET 6.x:

  • Version 6.0.0 (.NET 6 version added Postman/Newman, DDoS protection service)
  • Version 6.1.0 (Blazor client project based on generated REST API)
  • Version 6.2.0 (Refresh/Revoke JWT token)
  • LazyCache caching option for API service calls
  • NEXT (Add scaffolding to blazor client project)
    NOTE: Visual Studio 2022 (v.17) required

.NET 5.x:

  • Version 5.0.0 (.NET 5 version added Postman/Newman, DDoS protection service)

NOTE: Visual Studio 2019 (v.16.8+) required
  • Version 1.4 (.NET Core 2.2)
  • Version 1.5 (added Swagger authentication)
  • Version 1.6 (fix POST/PUT use; update unittests)
  • Version 2.0 (Update to .NET Core 3.1 - LTS version; added T4 templates for all layers code generation )
  • Version 2.2 (fixed the naming issues and updated solution's packages)
  • NO MORE UPDATES for .NET Core 2.2 vsix version

Watch our YouTube channel with instructions



Instructions:

1. Download and install the extension (VSIX).
2. Open Visual Studio and select new ApiNCoreD (with Dapper ORM) solution template from Visual C# templates section.
3. Nuget dependencies should be restored automatically with Internet connection. If not then you can use command 'Manage Nuget Packages -> Restore' and run for each project.
4. Once a solution is created the API service can run from Visual Studio with displaying the info page.
5. The configuration file in API project appsettings.json has to be updated like below:
"YourSolutionNameDBMigration": "your db connection string with no initial catalog specified",
"YourSolutionNameDB": "your db connection string",

6. Set in Visual Studio solution property page multiple projects startup for the API service and IndentityServer and run Visual Studio solution. When the VS run displays the info pages for API and IndentityServer than stop the run. The run triggers database migration and data seed code which creates and populates initial tables.
7. Run all tests in Test project. This time is used JWT as authetication service for the API.
8. Set and save in configuration file (appsettings.json) in Test project this setting:
"Authentication":"UseIndentityServer4": true,
9. Run IdentityServer by righ-click on project IdentityServer and "View/View in Browser" and wait for IS4 startup page
10. Build the solution.

Extended VSIX version steps

11. Run all tests in Test project. This time is used Indentity Server 4 as authetication service for the API.
12. Import Postman_tests_collection.json from Test project folder to Postman application.
13. Run JWT tests in Postman runner.
14. Set and save in configuration file (appsettings.json) in API project this setting:
"Authentication":"UseIndentityServer4": true,
15. Build the solution.
16. Run API and IS project the same time (use multiple startup project VS option)
17. Run IS4 tests in Postman runner.
18. Set REST API and Blazor test project as start up and run solution
19. Done.
Download full version of VSIX

Download full-featured VSIX extensions for VS2017, VS2019 and VS2022
(with XUnit project integration tests and Postman tests)

Get RestApiNDx.vsix extensions (.NET 6,.NET 5 and .NET Core 3.1/2.2) with Dapper ORM and FluentMigrator, Indentity Server 4 or JWT, T4 code generation, XUnit project integration tests, DDoS attacks protection and Postman tests json file.

Get these extensions for $33 CAD and save many hours to start with fully functional .NET Core API.

Please use Paypal "Return to merchant" link after your payment in order to get VSIXs download page.

Get
  • REST API with EF ORM and T4s (.NET 7,.NET 6,.NET 5 and .NET Core 3.1/2.2) vsix extensions,
  • REST API extensions with Dapper ORM, FluentMigrator, T4s (.NET 6, .NET 5 and .NET Core 3.1/2.2) vsix extensions and
  • REST API Python template extension
  • BONUS: Google Drive JQuery plugin demo solution (quickly connect and use GDrive storage from JavaScript)
  • Get all extensions for only $66 CAD and save many hours to start with fully functional .NET Core API.

    Please use Paypal "Return to merchant" link after your payment in order to get VSIXs download page.

    More information about REST API VS extension with EF here.

    More information about REST API Python wrapper here.

    Contact us

    Please use Paypal "Return to merchant" link after your payment in order to get VSIXs download page.

    You have 30 days to download the product using received link.

    If you have problems to download purchased VSIXs please contact us at code@anasoft.net and we will send you the download link.

    Note that no support is available for generated code with these VSIX extensions; however please let us know about suggestions, issues or improvements regarding solutions generated by the VS extensions.

    We guarantee access to all updates of the product up to 6 months after the date of the purchase.

    Thank you.
    ApiNCore team


    Extensions' icons thanks to cjdowner.

    Note that there is no restriction to use, copy, modify, and distribute software created with this Visual Studio extension template. Created solution using this template may contain code with unintentional flaws or limitations. Please adjust created solution to your needs and test it before any production use. IN NO EVENT SHALL OWNER OF THIS EXTENSION BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE OWNER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.