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);
                });
    学习永不止境,技术成就梦想。
  • 相关阅读:
    css选择器分类及运用
    盒模型的三大类简介
    html学习总结
    html基础知识
    iOS UITextFeild获取高亮部分的长度
    iOS问题:pch not found
    对KVC和KVO的理解
    数据库设计三范式
    Hibernate中解决No Hibernate Session bound to thread问题
    call by value 和 call by reference 的区别
  • 原文地址:https://www.cnblogs.com/zd1994/p/14329307.html
Copyright © 2011-2022 走看看