Emmanuel Fiadufe Posted on Feb 8 • Edited on Feb 16 Object reference not set to an instance of an object. #csharp Any help please Top comments (4) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand Emmanuel Fiadufe Emmanuel Fiadufe Emmanuel Fiadufe Follow Joined Oct 24, 2024 • Feb 9 Dropdown menu Copy link Hide Hello team, The data only get saved in sales table and the SalesItems table is empty, I used the breaking point but it didn't point out any specific errors, The error occurred on the loop Collapse Expand Emmanuel Fiadufe Emmanuel Fiadufe Emmanuel Fiadufe Follow Joined Oct 24, 2024 • Feb 8 Dropdown menu Copy link Hide The profit and the tax are not calculating it value Collapse Expand LuGe LuGe LuGe Follow Pronouns He/Him Joined Feb 9, 2025 • Feb 9 Dropdown menu Copy link Hide Chatgpt is saying the following to your problem: The specific error most likely arises when the ObjSalesModel or its tblSales property is null. Collapse Expand LuGe LuGe LuGe Follow Pronouns He/Him Joined Feb 9, 2025 • Feb 9 Dropdown menu Copy link Hide Hey Emmanuel , you can debug the code and go line by line an after the line with the null object is passed it will throw the error so you know then Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (4)
Hello team,
The data only get saved in sales table and the SalesItems table is empty, I used the breaking point but it didn't point out any specific errors,
The error occurred on the loop
The profit and the tax are not calculating it value
Chatgpt is saying the following to your problem:
The specific error most likely arises when the ObjSalesModel or its tblSales property is null.
Hey Emmanuel , you can debug the code and go line by line an after the line with the null object is passed it will throw the error so you know then