Esempio n. 1
0
 /*
  * protected override AdventureWorksLT2012Context CreateDataContext()
  * {
  *  var connection = _connectionFactory.GetRIAppDemoConnectionString();
  *  DbContextOptionsBuilder<AdventureWorksLT2012Context> optionsBuilder = new DbContextOptionsBuilder<AdventureWorksLT2012Context>();
  *  optionsBuilder.UseSqlServer(connection, (options)=> {
  *      // to support SQL SERVER 2008
  *      // options.UseRowNumberForPaging();
  *  });
  *  return new AdventureWorksLT2012Context(optionsBuilder.Options);
  * }
  */
 protected override DesignTimeMetadata GetDesignTimeMetadata(bool isDraft)
 {
     if (isDraft)
     {
         return(base.GetDesignTimeMetadata(true));
     }
     //  first the uncorrected metadata was saved into xml file and then edited
     return(DesignTimeMetadata.FromXML(ResourceHelper.GetResourceString("RIAppDemo.BLL.Metadata.MainDemo.xml")));
 }
 protected override Metadata GetMetadata(bool isDraft)
 {
     if (isDraft)
     {
         //returns raw (uncorrected) programmatically generated metadata from LinqToSQL classes
         return(base.GetMetadata(true));
     }
     //first the uncorrected metadata was saved into xml file and then edited
     return(Metadata.FromXML(ResourceHelper.GetResourceString("RIAppDemo.BLL.Metadata.MainDemo2.xml")));
 }