public async Task Get(string id) { var fromIPAddress = GetRemoteClientIPAddress(Request); var model = new HitModel { FromIP = new IPModel { Address = fromIPAddress, Location = await _geoLocationService.ExecuteAsync(fromIPAddress) }, ToClientId = id }; await _hitClient.ExecuteAsync(model); }
public async Task ExecuteAsync(HitModel model) { _clients.All.Hit(new { fromIP = new { address = model.FromIP.Address, location = new { longitude = model.FromIP.Location.Longitude, latitude = model.FromIP.Location.Latitude } }, toClientId = model.ToClientId }); }