File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed
Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1+ namespace BlazingShop . Products . Common ;
2+
3+ public sealed class GetCategoriesQuery
4+ {
5+ public int Id { get ; }
6+
7+ public string Title { get ; } = string . Empty ;
8+ }
Original file line number Diff line number Diff line change 1818 </div >
1919 </div >
2020 <div class =" col-3" >
21+ <div class =" mb-3" >
22+ <label for =" category" class =" form-label" >Category</label >
23+ <InputSelect id =" category" class =" form-select" aria-label =" Select Category"
24+ @bind-Value =" _model.CategoryId" >
25+ <option value =" " >Select Category</option >
26+ @foreach ( var category in _categories )
27+ {
28+ <option value =" @category.Id" >@category.Title </option >
29+ }
30+ </InputSelect >
31+ </div >
32+
33+ <div class =" mb-3" >
34+ <label for =" image" class =" form-label" >Image</label >
35+ <InputFile id =" image" class =" form-control" @bind-Value =" _model.Image" accept =" .png,.jpeg" />
36+ </div >
37+
2138 <div class =" mb-3" >
2239 <label for =" price" class =" form-label" >Price</label >
2340 <InputNumber id =" price" class =" form-control" @bind-Value =" _model.Price" />
Original file line number Diff line number Diff line change 1- namespace BlazingShop . Products . CreateProduct ;
1+ using BlazingShop . Products . Common ;
2+
3+ namespace BlazingShop . Products . CreateProduct ;
24
35public partial class CreateProductPage
46{
57 private readonly CreateProductInput _model = new ( ) ;
68
9+ private readonly IEnumerable < GetCategoriesQuery > _categories = [ ] ;
10+
711 async Task HandleSubmitAsync ( ) { }
812}
You can’t perform that action at this time.
0 commit comments