Hello every one .I have face a null value error
I have use three table use with navigation
1. UserMatser -ParentTable
2.UserSub -Child Table
it's my query
var Result = _context.UserSubscriptionMaster.Where(x => x.User.UserId == Id).
Select(x => new UserViewProfile()
{
UserName = x.User.UserName,
UserProfilePic = x.User.UserProfilePic,
Plans = x.Plan.PlanName,
UserEmail = x.User.UserEmail
}).FirstOrDefault();
if (Result != null)
obj_Detail.ViewUserDetail = Result;
It's working .But it's working with data in two table with same id. I have face null value in Data not availabe in two table .