void Main()
{
// Create a new Order object.
Post ord = new Post
{
User_id=2,
Post_doc_id="11",
Post_gpslocation_id="1",
Post_feeds="hell hi",
// …
};
// Add the new object to the Orders collection.
Posts.InsertOnSubmit(ord);
// Submit the change to the database.
try
{
SubmitChanges();
}
catch (Exception e)
{
Console.WriteLine(e);
// Make some adjustments.
// Try again.
SubmitChanges();
}
ord.Dump();
}
// Define other methods and classes here
{
// Create a new Order object.
Post ord = new Post
{
User_id=2,
Post_doc_id="11",
Post_gpslocation_id="1",
Post_feeds="hell hi",
// …
};
// Add the new object to the Orders collection.
Posts.InsertOnSubmit(ord);
// Submit the change to the database.
try
{
SubmitChanges();
}
catch (Exception e)
{
Console.WriteLine(e);
// Make some adjustments.
// Try again.
SubmitChanges();
}
ord.Dump();
}
// Define other methods and classes here

No comments:
Post a Comment