コード例 #1
0
        public IActionResult Post([FromBody] TAdressen adressen)
        {
            if (adressen is null)
            {
                return(BadRequest("Adresse is null."));
            }

            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            _dataRepository.Add(adressen);

            return(CreatedAtRoute("GetAdresse", new { Id = adressen.AdrAdresse }, null));
        }
コード例 #2
0
        public IActionResult Post([FromBody] TBeguenstigte beg)
        {
            if (beg is null)
            {
                return(BadRequest("Beguenstigte is null."));
            }

            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            _dataRepository.Add(beg);

            return(CreatedAtRoute("GetBeg", new { Id = beg.BegBeguenstigter }, null));
        }
コード例 #3
0
        public IActionResult Post([FromBody] TZusagen zusagen)
        {
            if (zusagen is null)
            {
                return(BadRequest("Zusagen is null."));
            }

            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            _dataRepository.Add(zusagen);

            return(CreatedAtRoute("GetZusagen", new { Id = zusagen.ZusZusage }, null));
        }