1
Answer

Getting exception cast to a value type system.decimal

Mark Tabor

Mark Tabor

2y
1.5k
1

Dear I have the following query in which I am calling a view in oracle it gives the below exception I could not get on which column it is giving an exception my view contains three tables with joins

The cast to value type 'System.Decimal' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type

MY QUERY IS HERE EmployeeID is coming from method 

var EmployeeInDB = (from vvv in db.NTH_VIEW_INFO

                                         where vvv.EmpID== EmployeeID

                                         select vvv).FirstOrDefault();

Answers (1)