Ejemplo n.º 1
0
 public bool Add(AirConditionerModelDto airConditionerModelDto)
 {
     Core.Models.AirConditionerModel airConditionerModel = new Core.Models.AirConditionerModel
     {
         Name = airConditionerModelDto.Name
     };
     try
     {
         _dbContext.AirConditionerModels.Add(airConditionerModel);
         _dbContext.SaveChanges();
         return(true);
     }catch (Exception ex)
     {
         return(false);
     }
 }
        public IActionResult Add(AirConditionerModelDto airConditionerModelDto)
        {
            var flag = _airConditionerModelService.Add(airConditionerModelDto);

            return(RedirectToAction("Index"));
        }