I have a problem converting int (long) to string. It throws me an exception when I am using l.code == l.id.ToString(). id is type long and code is nvarchar.
The code i am using is
if (municipalityId != null)
q = q.Where(l => l.MunicipalityId == municipalityId.Value && l.Code == l.Id.ToString());
Any help I would appreciate