public IActionResult Get(string name) { CreateUser obj = new CreateUser(); var nameList = obj.GetUserName(name); if (nameList.Count != 0) { var response = JsonConvert.SerializeObject(nameList); return(Ok(response)); } return(NotFound()); }