mercredi 2 août 2017

i want to update only single row column value with rollback commit

i want to update only single row column value with rollback commit but when i create table object inside if and pass to insertonsubmit it gives me error,plz help me how can i solve this

var challan = dataContext.Purchase_Challans.Where(t => t.Challan_ID == Convert.ToInt64(ViewState["challanid"]) && t.Company_ID == Convert.ToInt32(Session["CompanyId"])).Select(t => t).ToList();
                        if (challan.Any())
                        {
                            challan.ToList()[0].Inv_DocumentId = dmsPurchaseInvoice.Document_ID;
                            dataContext.Purchase_Challans.InsertOnSubmit()
                            dataContext.SubmitChanges();
                        }

Aucun commentaire:

Enregistrer un commentaire