public ActionResult GetClient(string id) { var client = _clientsRepository.GetClientByName(id); ViewData["Name"] = id; if (client != null) { ViewData["Age"] = client.Age; return(View("ClientFound")); } else { return(View("ClientNotFound")); } }
public async Task <Client> GetClientByName(string name) { var client = await _clientsRepository.GetClientByName(name); return(MapToClientDtoOrNull(client)); }