This is my code
obj.Category = _db.Category.FirstOrDefault(u => u.Id == obj.CategoryId);
it will have CS8601: Possible null reference assignment
how to fix this one or how to avoid this type of warning in visual studio 2022 using the C#10
This is my code
obj.Category = _db.Category.FirstOrDefault(u => u.Id == obj.CategoryId);
it will have CS8601: Possible null reference assignment
how to fix this one or how to avoid this type of warning in visual studio 2022 using the C#10
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Jun 30, 2022, 7:52 AM