Skip to content

Commit

Permalink
update abp version 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfubing committed Jun 18, 2020
1 parent 07ec007 commit c988357
Show file tree
Hide file tree
Showing 8 changed files with 665 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace Base.EntityFrameworkCore
{
public class MyProjectHttpApiHostMigrationsDbContext : AbpDbContext<MyProjectHttpApiHostMigrationsDbContext>
public class HttpApiHostMigrationsDbContext : AbpDbContext<HttpApiHostMigrationsDbContext>
{
public MyProjectHttpApiHostMigrationsDbContext(DbContextOptions<MyProjectHttpApiHostMigrationsDbContext> options)
public HttpApiHostMigrationsDbContext(DbContextOptions<HttpApiHostMigrationsDbContext> options)
: base(options)
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

namespace Base.EntityFrameworkCore
{
public class MyProjectHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory<MyProjectHttpApiHostMigrationsDbContext>
public class HttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory<HttpApiHostMigrationsDbContext>
{
public MyProjectHttpApiHostMigrationsDbContext CreateDbContext(string[] args)
public HttpApiHostMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();

var builder = new DbContextOptionsBuilder<MyProjectHttpApiHostMigrationsDbContext>()
var builder = new DbContextOptionsBuilder<HttpApiHostMigrationsDbContext>()
.UseSqlServer(configuration.GetConnectionString("Base"));

return new MyProjectHttpApiHostMigrationsDbContext(builder.Options);
return new HttpApiHostMigrationsDbContext(builder.Options);
}

private static IConfigurationRoot BuildConfiguration()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;

namespace Base.Migrations
{
[DbContext(typeof(MyProjectHttpApiHostMigrationsDbContext))]
partial class MyProjectHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot
[DbContext(typeof(HttpApiHostMigrationsDbContext))]
partial class HttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "3.0.0")
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "3.1.4")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

Expand Down
Loading

0 comments on commit c988357

Please sign in to comment.