Esempio n. 1
0
        public async Task <IActionResult> Create([Bind("Id,Date,Amount,Status")] SalesRecord salesRecord)
        {
            if (ModelState.IsValid)
            {
                await _salesRecordsService.InsertAsync(salesRecord);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(salesRecord));
        }
Esempio n. 2
0
        public async Task <IActionResult> Create(SalesRecord salesRecord)
        {
            await _salesRecordService.InsertAsync(salesRecord);

            return(RedirectToAction(nameof(SimpleSearch)));
        }