ASP.NET Zero Power Tools is a Visual Studio extension that helps you to create CRUD pages for your ASP.NET Zero projects in seconds. It generates all the layers from the database to the user interface by just defining an entity. You can also customize the generated code using templates and options.
In this article, we will explore some of the new features and improvements in ASP.NET Zero Power Tools 2.0.4, which was released on 3/13/2023.
Support for Visual Studio 2022
ASP.NET Zero Power Tools now supports Visual Studio 2022 (amd64), which is the latest version of Microsoft's flagship IDE. You can download and install ASP.NET Zero Power Tools from the Visual Studio Marketplace[^1^] or from Visual Studio's Extension and Updates menu.
Improved Entity Framework Core Integration
ASP.NET Zero Power Tools now uses Entity Framework Core Tools to generate migrations and update the database schema. This means you don't need to run any commands manually in the Package Manager Console or the dotnet CLI. You can also specify the DbContext type and the connection string name in the Power Tools options.
Enhanced User Interface Generation
ASP.NET Zero Power Tools now generates more user-friendly and responsive user interface components for your CRUD pages. It uses Bootstrap 4, DataTables, and Angular Material to create modern and consistent layouts. You can also customize the UI elements using templates and options.
ASP.NET Zero Power Tools is a powerful and convenient tool that can save you a lot of time and effort when developing ASP.NET Zero applications. It supports ASP.NET Zero v5.0.0 and above versions[^2^]. You can watch a quick introduction video[^3^] or a detailed introduction video to see it in action. You can also read the documentation[^2^] for more information.
How to Use ASP.NET Zero Power Tools
To use ASP.NET Zero Power Tools, you need to have Visual Studio 2017 (v15.9.0+) or Visual Studio 2022 (amd64) installed on your Windows machine. You also need to have .NET Core 2.2 Runtime and EF Core Tools installed.
After installing ASP.NET Zero Power Tools from the Visual Studio Marketplace or from Visual Studio's Extension and Updates menu, you can open your ASP.NET Zero solution in Visual Studio and right-click on the solution node in the Solution Explorer. You will see a menu item called \"ASP.NET Zero Power Tools\".
When you click on this menu item, you will see a dialog box where you can define your entity and its properties. You can also choose the project and the folder where you want to generate the code. You can also specify some options for the code generation, such as the DbContext type, the connection string name, the UI template, and the UI options.
After clicking on the \"Generate\" button, ASP.NET Zero Power Tools will create all the necessary files and folders for your entity in your solution. It will also run EF Core Tools to create a migration and update the database schema. You can then build and run your solution to see your CRUD page in action.
How to Customize ASP.NET Zero Power Tools
ASP.NET Zero Power Tools allows you to customize the generated code using templates and options. You can find the templates and options in the \"AspNetZeroRadTool\" folder in your solution root folder.
The templates are Razor files that define the structure and content of the generated code. You can edit these files using Visual Studio or any text editor. You can use Razor syntax and some predefined variables to customize the code generation.
The options are JSON files that define some parameters for the code generation. You can edit these files using Visual Studio or any text editor. You can use these options to change some aspects of the generated code, such as the namespace, the base class, the permissions, and the UI elements.
You can also create your own templates and options and save them in a different folder. You can then select this folder in the Power Tools dialog box when generating code.
Feedback and Support
We hope you enjoy using ASP.NET Zero Power Tools and find it useful for your development process. If you have any feedback or suggestions, please feel free to contact us at firstname.lastname@example.org or visit our website at https://aspnetzero.com/. We would love to hear from you and improve our product based on your needs. 061ffe29dd