Stored proc return as ObjectResult<Nullable<int>> using Entity frame work and want to convert this to int type
or how to check this value with another integer value
You have to loop over the ObjectResult<T> or use ObjectResult<T>.ElementAt() to retrieve individual elements. Then you can access the int values:
ObjectResult<Nullable<int>> queryResult = query.Execute(...);
foreach (Nullable<int> result in queryResult)
Console.WriteLine("{0}", result.Value);
You can check if a value is available using ObjectResult<T>.HasValue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With