コード例 #1
0
        public async Task <IActionResult> Add(string id, BedAddInputModel bedCreateInputModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(bedCreateInputModel));
            }

            BedServiceModel bedServiceModel = AutoMapper.Mapper.Map <BedServiceModel>(bedCreateInputModel);

            await bedService.Create(id, bedServiceModel);

            return(Redirect("/Administration/Room/All"));
        }