コード例 #1
0
        public async Task <IActionResult> AddNew(FuelTypeBindingModel model)
        {
            var serviceModel = Mapper.Map <FuelTypeServiceModel>(model);

            await this.fuelTypesService.CreateNewAsync(serviceModel);

            return(Redirect("Index"));
        }
コード例 #2
0
        public async Task <IActionResult> Edit(FuelTypeBindingModel model)
        {
            var serviceModel = Mapper.Map <FuelTypeServiceModel>(model);

            await this.fuelTypesService.EditAsync(serviceModel);

            return(RedirectToAction("Index"));
        }
コード例 #3
0
        public IActionResult AddNew()
        {
            var model = new FuelTypeBindingModel();

            return(View(model));
        }