Visual Studio project template for Web Api .NET Core 2.2 solutions
(.NET Core 3.1 template version for VS2019 here: REST API .NET Core 3.1 )
This Visual Studio extension provides an effective and quick start for .NET Core REST Web API service and saves many hours of exploring the Web for an optimal solution.
Four steps only:
- install the extension
- update API-appsettings.json with Data Source if not SQLEXPRESS
- run created solution/service which initiates migration/seed services to get the API service info page
- test with Swagger API specification link using test credentials email@example.com mysecretpassword123 to get security token
In extended vsix version added T4 templates to generate 600+ lines of code (api, controler, domain, test) per added entity class in no time; just compile, add new migration and run successfully generated tests.
More information and detailed instructions here: www.anasoft.net/apincore
Core features version
- Three layers projects Api, Domain and Entity
- Dependency Injection (.Net Core feature)
- Generic Service
- Generic Repository with Entity Framework
- EF lazy loading and DB concurrency errors
- Sync and Async calls
- Generic exception handler
- passwords encryption
- Serilog logging with Console and File sinks
- Migrations and seed from json objects build your empty database
- Select between Indentity Server 4 or JWT authorization/authentication for generated API
- Swagger and Swashbuckle API documentation for .NET Core 2
- T4 templates - simple code generation for domain and service classes
- API versioning
Extended features version
- All core features included.
- Swagger authentication
- T4 templates - smart code generation driven by existing entity classes (inherits from BaseEntity). T4 templates generate code for related domain, service, controller and test classes based on added entity classes in single click. Great time saver!
- XUnit integration tests project added to the solution for IS4 mode or JWT authentication mode.
- Postman API tests as json file for import (IS4 and JWT tests). Import and run the tests.
- Version 1.9 (.NET Core 2.2)
- Version 2.0 (added Swagger authentication) (only Extended features version)
- Version 2.1 (fixed POST/PUT use)
- Version 3.3 (simple VS T4 templates - code generation for domain and service classes) (only Extended features version)
- Version 3.5 (EF lazy loading)
- Version 3.6 (Update Repository Update method )
- Version 3.7 ( DB concurrency implemented for Update)
- Version 3.8 ( Add predicate search example service function)
- Version 3.9 (Update T4 template code generator) (only Extended features version)
- Version 4.0 (Added a service API versioning library for Microsoft ASP.NET Core and Swagger versioning)
- Version 4.1 (Added CodeGeneratorUtility.bat to execute all T4s) (only Extended features version)
- Version 4.2 (EF add-migration fix and added DI code generator)
For instructions and more about free and full-featured VSIX extension visit: www.anasoft.net/apincore
More extensions with more features:
Please give us your rating and ask for more features.
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.