Exemple #1
0
 public void updateSchema()
 {
     using (ClassLibrary1Context dbContext = new ClassLibrary1Context())
     {
         dbContext.UpdateSchema();
     }
 }
Exemple #2
0
        public void insert()
        {
            using (ClassLibrary1Context fluentContext = new ClassLibrary1Context())
            {
                object product  = fluentContext.CreateInstance("FluentModel.Product");
                object category = fluentContext.CreateInstance("FluentModel.Category");

                fluentContext.Add(product);
                fluentContext.Add(category);

                fluentContext.SaveChanges();
            }
        }