Example #1
0
 public virtual VfpContextModel GetModel(AbpVfpContext dbContext)
 {
     return(ModelCache.GetOrAdd(
                dbContext.GetType(),
                _ => CreateModel(dbContext)
                ));
 }
Example #2
0
        protected virtual VfpContextModel CreateModel(AbpVfpContext dbContext)
        {
            var modelBuilder = CreateModelBuilder();

            BuildModelFromDbContextType(modelBuilder, dbContext.GetType());
            BuildModelFromDbContextInstance(modelBuilder, dbContext);
            return(modelBuilder.Build());
        }
Example #3
0
 protected virtual void BuildModelFromDbContextInstance(IVfpModelBuilder modelBuilder, AbpVfpContext dbContext)
 {
     dbContext.CreateModel(modelBuilder);
 }