I have CrewPerVessel vess = new CrewPerVessel();
vess = _crewperVesselRepository.GetFirstItem(x => x.CrewPerVesselId == crewpergroup.CrewId && x.EmployeeProfilePersonalDetail.Position.PositionName == "Boat Captain");
and i have obj.id = (vess.id == null)? vess.id = 0 : obj.id = vess.id
after running the execution if i got object not reference to object and i know this code above obj.id = (vess.id == null)? vess.id = 0 : obj.id = vess.id makes my project stop. Can you help me guys if how can make this work?