public List <Mahasiswa> GetListMahasiswa() { List <Mahasiswa> Res = new List <Mahasiswa>(); AppContext.SetSwitch( "System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true); using var channel = GrpcChannel.ForAddress("http://localhost:5001"); var client = new Greeter.GreeterClient(channel); var reply = client.GetListMahasiswa(new empty { }); foreach (var item in reply.Mahasiswa) { Res.Add(item); } return(Res); }