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

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