public string GetUsers() { var users = new UsersDB(); var result = users.GetAll(); var listResult = new List <string>(); //Convert array to string foreach (var item in result) { listResult.Add(item.ToString()); } return(string.Join(",", listResult.ToArray())); }