// Server side handler of the GetEmployeeName RPC public override Task <EmployeeName> GetEmployeeName(EmployeeNameRequest request, ServerCallContext context) { Console.WriteLine($"{nameof(AccountService)} | {nameof(GetEmployeeName)} | Request: {request.EmpId}"); EmployeeData empData = new EmployeeData(); return(Task.FromResult(empData.GetEmployeeName(request))); }
public override Task <EmployeeName> GetEmployeeName(EmployeeNameRequest request, ServerCallContext context) { Console.CursorTop = 3; Console.CursorLeft = 0; Console.WriteLine("Iteration count: {0,22:D8}", ++_invocationCounter); return(Task.FromResult(new EmployeeData().GetEmployeeName(request))); }
public EmployeeName GetEmployeeName(EmployeeNameRequest request) { EmployeeName empName = new EmployeeName(); switch (request.EmpId) { case "1": empName.FirstName = "John"; empName.LastName = "Doe"; break; case "2": empName.FirstName = "Dave"; empName.LastName = "Williams"; break; default: break; } return(empName); }
public EmployeeName GetEmployeeName(EmployeeNameRequest request) { EmployeeName empName = new EmployeeName(); switch (request.EmpId) { case "1": empName.FirstName = "Scott"; empName.LastName = "Gu"; break; case "2": empName.FirstName = "Scott"; empName.LastName = "Hanselman"; break; default: empName.FirstName = "Damien"; empName.LastName = "Edward"; break; } return(empName); }
// Server side handler of the GetEmployeeName RPC public override Task <EmployeeName> GetEmployeeName(EmployeeNameRequest request, ServerCallContext context) { EmployeeData empData = new EmployeeData(); return(Task.FromResult(empData.GetEmployeeName(request))); }
public override Task <EmployeeName> GetEmployeeName(EmployeeNameRequest request, ServerCallContext context) { return(Task.FromResult(new Data.EmployeeData().GetEmployeeName(request))); }