Dear All,
Please help me When i execute this linq to sql command its given an error "The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type."
- 0 Records in my Commotidy Table
- I want generate manual number and get the last CommodityCode
My Code as follow,
Dim QRecordCount = From RC In cntxtCommodity.CommodityMasters _
Where RC.CommodityCode <> 0 _
Select RC.CommodityCode
LastCommodityCode = QRecordCount.Max() + 1
VB.NET 2008
Suhaib