zoukankan      html  css  js  c++  java
  • Abpvnext笔记

    1,依赖注入

    EntityframeworkDemoSchemaDbMigrator : IDemoSchemaDbMigrator, ITransientDependency
    约定:实现类后面的命令必须包含DemoSchemaDbMigrator

    2,appsettings.json

    ①始终复制

      <ItemGroup>
        <Content Include="appsettings.json">
          <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
          <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        </Content>
      </ItemGroup>

    ②嵌入的资源

      <ItemGroup>
        <None Remove="TemplatesFilesHello.tpl" />
        <EmbeddedResource Include="TemplatesFilesHello.tpl" />
      </ItemGroup>
      <ItemGroup>
        <EmbeddedResource Include="LocalizationFiles*.json" />
        <Content Remove="LocalizationFiles*.json" />
      </ItemGroup>

    3,迁移程序执行流程

    4,Hw_ScheduDbContextModelCreatingExtensions

                 builder.Entity<TaskInfo>(b=>{
                    b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "TaskInfos");
                    b.ConfigureByConvention();
                    b.Property(x=>x.Name).HasMaxLength(TaskInfoConsts.MaxNameLength).IsRequired();
                    b.Property(x=>x.Remark).HasMaxLength(TaskInfoConsts.MaxRemarkLength);
                    b.Property(x=>x.Api).HasMaxLength(TaskInfoConsts.MaxApiLength).IsRequired();
                    b.Property(x=>x.Cron).HasMaxLength(TaskInfoConsts.MaxCronLength).IsRequired();
                    b.Property(x=>x.Status).IsRequired();
                    b.Property(x=>x.SystemInfoId).IsRequired();
                    b.Property(x=>x.CreationTime).HasColumnType("datetime").HasDefaultValueSql("now()").IsRequired();
                    b.Property(x=>x.LastModificationTime).HasColumnType("datetime").HasDefaultValueSql("now()").IsRequired();
                    b.Property(x=>x.DeletionTime).HasColumnType("datetime").HasDefaultValueSql("now()").IsRequired();
                    b.HasIndex(x=>x.SystemInfoId);
                });
    学习永不止境,技术成就梦想。
  • 相关阅读:
    数据结构 数据结构分类
    数据结构 基本概念(数据项--数据元素--数据对象)
    C++ STL标准模板库(list)
    C++ STL标准模板库(queue)
    python文件操作--字符串替换
    Python 拷贝对象(深拷贝deepcopy与浅拷贝copy)
    pyCharm使用
    Python中变量的作用域(variable scope)
    对于python,一切事物都是对象,对象基于类创建
    python主文件判断
  • 原文地址:https://www.cnblogs.com/zd1994/p/14329307.html
Copyright © 2011-2022 走看看