コード例 #1
0
 public void Insert(CountryModel param)
 {
     param.Id = Guid.NewGuid();                                   // generate new ID for the new record
     dbContext.Countries.InsertOnSubmit(MapModelToObject(param)); //add to ORM layer
     dbContext.SubmitChanges();                                   // commit to DB
 }
コード例 #2
0
 public void Insert(CategoryModel categoryModel)
 {
     categoryModel.Id = Guid.NewGuid();                                    // generate new ID for the new record
     dbContext.Categories.InsertOnSubmit(MapModelToObject(categoryModel)); //add to ORM layer
     dbContext.SubmitChanges();                                            // commit to DB
 }