trying to fix release build
This commit is contained in:
parent
0644e3f7ea
commit
f67b20d6bb
3 changed files with 57 additions and 45 deletions
|
@ -1,51 +1,51 @@
|
||||||
// <auto-generated />
|
// // <auto-generated />
|
||||||
using System;
|
// using System;
|
||||||
using Microsoft.EntityFrameworkCore;
|
// using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
// using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
// using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
// using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Sledgemapper.Helpers;
|
// using Sledgemapper.Helpers;
|
||||||
|
|
||||||
namespace Sledgemapper.Migrations.SqlServerMigrations
|
// namespace Sledgemapper.Migrations.SqlServerMigrations
|
||||||
{
|
// {
|
||||||
[DbContext(typeof(DataContext))]
|
// [DbContext(typeof(DataContext))]
|
||||||
partial class DataContextModelSnapshot : ModelSnapshot
|
// partial class DataContextModelSnapshot : ModelSnapshot
|
||||||
{
|
// {
|
||||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
// protected override void BuildModel(ModelBuilder modelBuilder)
|
||||||
{
|
// {
|
||||||
#pragma warning disable 612, 618
|
// #pragma warning disable 612, 618
|
||||||
modelBuilder
|
// modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "3.1.0")
|
// .HasAnnotation("ProductVersion", "3.1.0")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
// .HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
// .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
modelBuilder.Entity("Sledgemapper.Entities.User", b =>
|
// modelBuilder.Entity("Sledgemapper.Entities.User", b =>
|
||||||
{
|
// {
|
||||||
b.Property<int>("Id")
|
// b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd()
|
// .ValueGeneratedOnAdd()
|
||||||
.HasColumnType("int")
|
// .HasColumnType("int")
|
||||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
// .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||||
|
|
||||||
b.Property<string>("FirstName")
|
// b.Property<string>("FirstName")
|
||||||
.HasColumnType("nvarchar(max)");
|
// .HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("LastName")
|
// b.Property<string>("LastName")
|
||||||
.HasColumnType("nvarchar(max)");
|
// .HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<byte[]>("PasswordHash")
|
// b.Property<byte[]>("PasswordHash")
|
||||||
.HasColumnType("varbinary(max)");
|
// .HasColumnType("varbinary(max)");
|
||||||
|
|
||||||
b.Property<byte[]>("PasswordSalt")
|
// b.Property<byte[]>("PasswordSalt")
|
||||||
.HasColumnType("varbinary(max)");
|
// .HasColumnType("varbinary(max)");
|
||||||
|
|
||||||
b.Property<string>("Username")
|
// b.Property<string>("Username")
|
||||||
.HasColumnType("nvarchar(max)");
|
// .HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
// b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Users");
|
// b.ToTable("Users");
|
||||||
});
|
// });
|
||||||
#pragma warning restore 612, 618
|
// #pragma warning restore 612, 618
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
|
@ -35,9 +35,9 @@ namespace Sledgemapper.Api
|
||||||
// This method gets called by the runtime. Use this method to add services to the container.
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
{
|
{
|
||||||
if (_env.IsProduction())
|
// if (_env.IsProduction())
|
||||||
services.AddDbContext<DataContext>();
|
// services.AddDbContext<DataContext>();
|
||||||
else
|
// else
|
||||||
services.AddDbContext<DataContext, SqliteDataContext>();
|
services.AddDbContext<DataContext, SqliteDataContext>();
|
||||||
|
|
||||||
// services.AddRazorPages();
|
// services.AddRazorPages();
|
||||||
|
|
12
Sledgemapper.Api/appsettings.Production.json
Normal file
12
Sledgemapper.Api/appsettings.Production.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"ConnectionStrings": {
|
||||||
|
"WebApiDatabase": "Data Source=LocalDatabase.db"
|
||||||
|
},
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Debug",
|
||||||
|
"System": "Information",
|
||||||
|
"Microsoft": "Information"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue