I am using LINQ in my project. I have tried using update query. But this is not working for me.
Please any body help me. Did I need to change any settings of my database? or for the datacontext?
My code is as follows:
here dc is the datacontext, getinteger() is an extension method, ucItem is a custom control,
Common is a class
if (clsTblAsset.AssetId == 0)
{
clsTblAsset.StockId = ucItem._Id.getInteger();
clsTblAsset.RefId = 0;
clsTblAsset.RefModule = "S";
clsTblAsset.AssetEntryDate = DateTime.Now.Date.getDateTime();
clsTblAsset.LoginId = ClsParameters.LogInId;
Common.dc.TblAssets.InsertOnSubmit(clsTblAsset);
}
Common.dc.SubmitChanges();
Can any body help me now please..
Regards,
Jineesh