entity framework and inserting rows
I am trying to insert a row into an SQL Compact database using LINQ and the entity framework, and I can't seem to insert rows. I have the following code:
which, from what I've read, is the right way to do it, but it doesn't insert the row. it silently fails - no exceptions thrown - and no row appears in the table.
InventoryEntities invEnt = new InventoryEntities();
product myProduct = new product();
myProduct.id_product = 0;
myProduct.item_num = frmCreate.ItemNum;
myProduct.description = frmCreate.ItemDesc;
myProduct.min_qty = frmCreate.MinLevel;
myProduct.par_qty = frmCreate.ParLevel;
What am I doing wrong?