Esempio n. 1
0
        public void AddTestModel(AddTestModelDto addTestModelDto)
        {
            TestModel testModel = new TestModel()
            {
                Value = addTestModelDto.Value
            };

            _repository.Add(testModel);
        }
        public IActionResult AddTestModel([FromBody] AddTestModelDto testModelDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _testModelServices.AddTestModel(testModelDto);
            return(Ok());
        }