Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Linq FromSqlRaw - Data is Null. - Comments Field Varchar Null

$
0
0

Hi All,

I got this;

var result = _context.Set<spCallResult>().FromSqlRaw("exec [dbo].[spCallVal] @XX={0}", xx).ToList();

System.Data.SqlTypes.SqlNullValueException: 'Data is Null. This method or property cannot be called on Null values.'

My Comments field is varchar(max) null

How to resolved this in FromSqlRaw?

Thanks

Regards,

Micheale


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>