Here I add some data to the database using EF code. When I add a reference using But I need to update another table (another reference) using productId avaialble in the IODR object.
This is my code
public int AddorUpdateSalesOrder {try {if {iOd.InvoiceId! = Null} {//context.Entry(iOdr) .tate = EntityState.Modified; Context.InvoiceHDs.Add (iOd); // Here the producer of // I need to use ProductId (it is available in IOdr). // If the product is Id 1 then I have to make // update product tables with the new value of ProductQuantity coloumn}} other {context.InvoiceHDs.Add (iOdr);}} Catch (exception before) {string msg = ex.Message; } Return references.
I do not know how to call the second reference Please kindly give me help for this Thanks
If I'm reading it correctly then you need to create a new example of your second reference,
Comments
Post a Comment