How to convert IPAddress to String is not that enough to use .ToString()? I do it in LINQ and I get :
Object reference not set to an instance of an object
here is my code:
var x = (from t in db.v_vpn_gateway.AsEnumerable()
select new TurbineDvce
{
Comments = "VPN Gateway",
Description = string.Empty,
DeviceType = t.device_type,
TurbineId = t.turbine_id.ToString(),
Username = string.Empty
})
TurbineId is string