コード例 #1
0
 /// <summary>
 /// use this contructor to create a new context. Also for usage of the <see cref="ExcelColumnConfigurationAttribute"/> variant.
 /// </summary>
 /// <param name="options">leave null to apply default configurations</param>
 public ExcelContext(ExcelOptions options = null)
 {
     if (options == null)
     {
         options = new ExcelOptions();
     }
     Options      = options;
     ModelBuilder = new ExcelModelBuilder();
     OnCreating(ModelBuilder);
     ValidateModel();
 }
コード例 #2
0
 /// <summary>
 /// override this method in your derived class to call <see cref="ExcelModelBuilder.Entity{TEntity}(Action{ExcelEntityBuilder{TEntity}})"/>
 /// to start tracking an entity and configure it's properties and associated excel column
 /// </summary>
 /// <param name="modelBuilder"></param>
 protected virtual void OnCreating(ExcelModelBuilder modelBuilder)
 {
 }