
Mastering ABP Framework
By :

In this section, we will create the necessary functionality to add a new product. A product should have a category. So, we should select a category while adding a new product. We will define new application service methods to get categories and create products. In the UI section, we will use ABP's dynamic form feature to automatically generate the product creation form, based on a C# class.
Let's start by adding two new methods to the IProductAppService
interface:
Task CreateAsync(CreateUpdateProductDto input); Task<ListResultDto<CategoryLookupDto>> GetCategoriesAsync();
We will use the GetCategoriesAsync
method to show a drop-down list of categories on product creation. We've introduced two new DTOs, and we should define them.
CreateUpdateProductDto
is used to create and update products (we will reuse it in the Editing products section). Define it in the Products folder of the ProductManagement...