public IActionResult AddProfile([FromBody] Mentorprofile profile) { if (ModelState.IsValid) { bool result = repository.AddProfile(profile); if (result) { return(Created("AddProfile", profile.Id)); } return(StatusCode(StatusCodes.Status500InternalServerError)); } return(BadRequest(ModelState)); }