Esempio n. 1
0
 public void updateSchema()
 {
     using (ClassLibrary1Context dbContext = new ClassLibrary1Context())
     {
         dbContext.UpdateSchema();
     }
 }
Esempio n. 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();
            }
        }