public IActionResult Post([FromBody] ContactSavingModel contactToCreateModel, string team) { if (team != null) { var teamName = nameof(contactToCreateModel.Team); contactToCreateModel.Team = team; ModelState.ClearError(teamName); } if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var contactToCreate = ContactMapper.ContactModelToContact(contactToCreateModel); return(Ok(_contactManager.CreateContact(contactToCreate).ToString())); }