Example #1
0
        public IActionResult PostTeam([FromBody] TeamForCreationDTO teamFromRequest)
        {
            if (teamFromRequest == null)
            {
                return(BadRequest());
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _repo.AddTeam(ModelsMapping.GetTeamEntity(teamFromRequest));
            return(Ok());
        }