public async Task AddProduct([FromBody] AddProductRequest product)
 {
     await billsModule.ExecuteCommandAsync(
         new AddProduct
     {
         Name              = product.Name,
         Barcode           = product.Barcode,
         Price             = product.Price,
         ProductCategoryId = product.ProductCategoryId
     }
         );
 }
Exemple #2
0
        public async Task <IActionResult> AddBill([FromBody] AddBillRequest request)
        {
            await billsModule.ExecuteCommandAsync(new AddBill(request.Date, request.StoreId, request.Purchases));

            return(Ok());
        }
Exemple #3
0
 public async Task AddStore([FromBody] AddStoreRequest store)
 {
     await billsModule.ExecuteCommandAsync(new AddStore(store.Name));
 }