public override Task <DipendenteReply> GetDipendente(DipendenteRequest request, ServerCallContext context) { //return Task.FromResult(d); return(Task.FromResult(new DipendenteReply { Comune = "Roma", Nominativo = "Giovanni Appugliese" }));; }
public static async void GelAllDipendentiListAsync() { DipendenteRequest dr = new DipendenteRequest() { Ok = 1 }; DipendentiReply drList = await service.GetAllDipendentiListAsync(dr); foreach (var dip in drList.ListaDipendenti) { Console.WriteLine(dip.Comune + " " + dip.Nominativo); } }
public override async Task <DipendentiReply> GetAllDipendentiList(DipendenteRequest request, ServerCallContext context) { List <DipendenteReply> dips = new List <DipendenteReply>(); for (int i = 0; i < 5; i++) { DipendenteReply d = new DipendenteReply(); d.Comune = "Roma " + i.ToString(); d.Nominativo = "GioAppu" + i.ToString(); dips.Add(d); } DipendentiReply dipend = new DipendentiReply(); dipend.ListaDipendenti.Add(dips); return(dipend); }