I found the solution, wrong database :)
I have this simple code:
Order myOrder = new Order(str);"OS5";
myOrder.StateID =
myOrder.Save();
It returns a error:System.Data.SqlClient.SqlException: The UPDATE statement conflicted with the FOREIGN KEY constraint "EcomOrders$EcomOrderStatesEcomOrders". The conflict occurred in database "eCom", table "dbo.EcomOrderStates", column 'OrderStateID'.
The statement has been terminated
What I wrong?
Dynamicweb.eCommerce.Orders.