diff --git a/SchengenVisaApi/Infrastructure/DependencyInjection.cs b/SchengenVisaApi/Infrastructure/DependencyInjection.cs index 0a3fa17..d93e5f2 100644 --- a/SchengenVisaApi/Infrastructure/DependencyInjection.cs +++ b/SchengenVisaApi/Infrastructure/DependencyInjection.cs @@ -21,13 +21,11 @@ public static class DependencyInjection { /// Add services needed for Infrastructure layer public static IServiceCollection AddInfrastructure(this IServiceCollection services, - IConfigurationManager configurationManager, - bool isDevelopment) + IConfigurationManager configurationManager) { - var databaseName = isDevelopment ? "developmentDB" : "normal'naya database"; services.AddDbContext(opts => - opts.UseNpgsql(configurationManager.GetConnectionString(databaseName))); + opts.UseNpgsql(configurationManager.GetConnectionString("connectionString"))); services.AddScoped(serviceProvider => serviceProvider.GetRequiredService()); services.AddScoped(serviceProvider => serviceProvider.GetRequiredService()); diff --git a/SchengenVisaApi/Infrastructure/Migrations/20250509170104_TimeStampTypeChange.Designer.cs b/SchengenVisaApi/Infrastructure/Migrations/20250509170104_TimeStampTypeChange.Designer.cs new file mode 100644 index 0000000..831df7b --- /dev/null +++ b/SchengenVisaApi/Infrastructure/Migrations/20250509170104_TimeStampTypeChange.Designer.cs @@ -0,0 +1,502 @@ +// +using System; +using Infrastructure.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Infrastructure.Migrations +{ + [DbContext(typeof(DatabaseContext))] + [Migration("20250509170104_TimeStampTypeChange")] + partial class TimeStampTypeChange + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "9.0.2") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Domains.ApplicantDomain.Applicant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("BirthDate") + .HasColumnType("timestamp without time zone"); + + b.Property("Citizenship") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(false) + .HasColumnType("character varying(30)"); + + b.Property("CitizenshipByBirth") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(false) + .HasColumnType("character varying(30)"); + + b.Property("CityOfBirth") + .IsRequired() + .HasMaxLength(70) + .IsUnicode(false) + .HasColumnType("character varying(70)"); + + b.Property("CountryOfBirth") + .IsRequired() + .HasMaxLength(70) + .IsUnicode(false) + .HasColumnType("character varying(70)"); + + b.Property("Gender") + .HasColumnType("integer"); + + b.Property("IsNonResident") + .HasColumnType("boolean"); + + b.Property("JobTitle") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b.Property("MaritalStatus") + .HasColumnType("integer"); + + b.Property("PlaceOfWorkId") + .HasColumnType("uuid"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("PlaceOfWorkId"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("Applicant"); + }); + + modelBuilder.Entity("Domains.ApplicantDomain.PlaceOfWork", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnType("character varying(200)"); + + b.Property("PhoneNum") + .IsRequired() + .HasMaxLength(13) + .IsUnicode(false) + .HasColumnType("character varying(13)"); + + b.HasKey("Id"); + + b.ToTable("PlaceOfWork"); + }); + + modelBuilder.Entity("Domains.Users.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(254) + .IsUnicode(false) + .HasColumnType("character varying(254)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b.Property("Role") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("Email") + .IsUnique(); + + b.ToTable("User"); + }); + + modelBuilder.Entity("Domains.VisaApplicationDomain.VisaApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("ApplicantId") + .HasColumnType("uuid"); + + b.Property("DestinationCountry") + .IsRequired() + .HasMaxLength(70) + .IsUnicode(false) + .HasColumnType("character varying(70)"); + + b.Property("ForGroup") + .HasColumnType("boolean"); + + b.Property("RequestDate") + .HasColumnType("timestamp without time zone"); + + b.Property("RequestedNumberOfEntries") + .HasColumnType("integer"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("ValidDaysRequested") + .HasColumnType("integer"); + + b.Property("VisaCategory") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ApplicantId"); + + b.ToTable("VisaApplication"); + }); + + modelBuilder.Entity("Domains.ApplicantDomain.Applicant", b => + { + b.HasOne("Domains.ApplicantDomain.PlaceOfWork", "PlaceOfWork") + .WithMany() + .HasForeignKey("PlaceOfWorkId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Domains.Users.User", null) + .WithOne() + .HasForeignKey("Domains.ApplicantDomain.Applicant", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsOne("Domains.ApplicantDomain.Name", "FatherName", b1 => + { + b1.Property("ApplicantId") + .HasColumnType("uuid"); + + b1.Property("FirstName") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.Property("Patronymic") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.Property("Surname") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.HasKey("ApplicantId"); + + b1.ToTable("Applicant"); + + b1.WithOwner() + .HasForeignKey("ApplicantId"); + }); + + b.OwnsOne("Domains.ApplicantDomain.Name", "MotherName", b1 => + { + b1.Property("ApplicantId") + .HasColumnType("uuid"); + + b1.Property("FirstName") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.Property("Patronymic") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.Property("Surname") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.HasKey("ApplicantId"); + + b1.ToTable("Applicant"); + + b1.WithOwner() + .HasForeignKey("ApplicantId"); + }); + + b.OwnsOne("Domains.ApplicantDomain.Name", "Name", b1 => + { + b1.Property("ApplicantId") + .HasColumnType("uuid"); + + b1.Property("FirstName") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.Property("Patronymic") + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.Property("Surname") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnType("character varying(50)"); + + b1.HasKey("ApplicantId"); + + b1.ToTable("Applicant"); + + b1.WithOwner() + .HasForeignKey("ApplicantId"); + }); + + b.OwnsOne("Domains.ApplicantDomain.Passport", "Passport", b1 => + { + b1.Property("ApplicantId") + .HasColumnType("uuid"); + + b1.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b1.Property("IssueDate") + .HasColumnType("timestamp without time zone"); + + b1.Property("Issuer") + .IsRequired() + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnType("character varying(200)"); + + b1.Property("Number") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character varying(20)"); + + b1.HasKey("ApplicantId"); + + b1.ToTable("Applicant"); + + b1.WithOwner() + .HasForeignKey("ApplicantId"); + }); + + b.Navigation("FatherName") + .IsRequired(); + + b.Navigation("MotherName") + .IsRequired(); + + b.Navigation("Name") + .IsRequired(); + + b.Navigation("Passport") + .IsRequired(); + + b.Navigation("PlaceOfWork"); + }); + + modelBuilder.Entity("Domains.ApplicantDomain.PlaceOfWork", b => + { + b.OwnsOne("Domains.ApplicantDomain.Address", "Address", b1 => + { + b1.Property("PlaceOfWorkId") + .HasColumnType("uuid"); + + b1.Property("Building") + .IsRequired() + .HasMaxLength(10) + .IsUnicode(false) + .HasColumnType("character varying(10)"); + + b1.Property("City") + .IsRequired() + .HasMaxLength(70) + .IsUnicode(false) + .HasColumnType("character varying(70)"); + + b1.Property("Country") + .IsRequired() + .HasMaxLength(70) + .IsUnicode(false) + .HasColumnType("character varying(70)"); + + b1.Property("Street") + .IsRequired() + .HasMaxLength(100) + .IsUnicode(false) + .HasColumnType("character varying(100)"); + + b1.HasKey("PlaceOfWorkId"); + + b1.ToTable("PlaceOfWork"); + + b1.WithOwner() + .HasForeignKey("PlaceOfWorkId"); + }); + + b.Navigation("Address") + .IsRequired(); + }); + + modelBuilder.Entity("Domains.VisaApplicationDomain.VisaApplication", b => + { + b.HasOne("Domains.ApplicantDomain.Applicant", null) + .WithMany() + .HasForeignKey("ApplicantId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.OwnsMany("Domains.VisaApplicationDomain.PastVisa", "PastVisas", b1 => + { + b1.Property("VisaApplicationId") + .HasColumnType("uuid"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property("Id")); + + b1.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b1.Property("IssueDate") + .HasColumnType("timestamp without time zone"); + + b1.Property("Name") + .IsRequired() + .HasMaxLength(70) + .IsUnicode(false) + .HasColumnType("character varying(70)"); + + b1.HasKey("VisaApplicationId", "Id"); + + b1.ToTable("PastVisa"); + + b1.WithOwner() + .HasForeignKey("VisaApplicationId"); + }); + + b.OwnsMany("Domains.VisaApplicationDomain.PastVisit", "PastVisits", b1 => + { + b1.Property("VisaApplicationId") + .HasColumnType("uuid"); + + b1.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property("Id")); + + b1.Property("DestinationCountry") + .IsRequired() + .HasMaxLength(70) + .IsUnicode(false) + .HasColumnType("character varying(70)"); + + b1.Property("EndDate") + .HasColumnType("timestamp without time zone"); + + b1.Property("StartDate") + .HasColumnType("timestamp without time zone"); + + b1.HasKey("VisaApplicationId", "Id"); + + b1.ToTable("PastVisit"); + + b1.WithOwner() + .HasForeignKey("VisaApplicationId"); + }); + + b.OwnsOne("Domains.VisaApplicationDomain.PermissionToDestCountry", "PermissionToDestCountry", b1 => + { + b1.Property("VisaApplicationId") + .HasColumnType("uuid"); + + b1.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b1.Property("Issuer") + .IsRequired() + .HasMaxLength(200) + .IsUnicode(false) + .HasColumnType("character varying(200)"); + + b1.HasKey("VisaApplicationId"); + + b1.ToTable("VisaApplication"); + + b1.WithOwner() + .HasForeignKey("VisaApplicationId"); + }); + + b.OwnsOne("Domains.VisaApplicationDomain.ReentryPermit", "ReentryPermit", b1 => + { + b1.Property("VisaApplicationId") + .HasColumnType("uuid"); + + b1.Property("ExpirationDate") + .HasColumnType("timestamp without time zone"); + + b1.Property("Number") + .IsRequired() + .HasMaxLength(25) + .IsUnicode(false) + .HasColumnType("character varying(25)"); + + b1.HasKey("VisaApplicationId"); + + b1.ToTable("VisaApplication"); + + b1.WithOwner() + .HasForeignKey("VisaApplicationId"); + }); + + b.Navigation("PastVisas"); + + b.Navigation("PastVisits"); + + b.Navigation("PermissionToDestCountry"); + + b.Navigation("ReentryPermit"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/SchengenVisaApi/Infrastructure/Migrations/20250509170104_TimeStampTypeChange.cs b/SchengenVisaApi/Infrastructure/Migrations/20250509170104_TimeStampTypeChange.cs new file mode 100644 index 0000000..abd6f87 --- /dev/null +++ b/SchengenVisaApi/Infrastructure/Migrations/20250509170104_TimeStampTypeChange.cs @@ -0,0 +1,183 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Infrastructure.Migrations +{ + /// + public partial class TimeStampTypeChange : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "VisaApplication", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "ReentryPermit_ExpirationDate", + table: "VisaApplication", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PermissionToDestCountry_ExpirationDate", + table: "VisaApplication", + type: "timestamp without time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "StartDate", + table: "PastVisit", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "EndDate", + table: "PastVisit", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "IssueDate", + table: "PastVisa", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "ExpirationDate", + table: "PastVisa", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "Passport_IssueDate", + table: "Applicant", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "Passport_ExpirationDate", + table: "Applicant", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + + migrationBuilder.AlterColumn( + name: "BirthDate", + table: "Applicant", + type: "timestamp without time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp with time zone"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "VisaApplication", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + + migrationBuilder.AlterColumn( + name: "ReentryPermit_ExpirationDate", + table: "VisaApplication", + type: "timestamp with time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PermissionToDestCountry_ExpirationDate", + table: "VisaApplication", + type: "timestamp with time zone", + nullable: true, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "StartDate", + table: "PastVisit", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + + migrationBuilder.AlterColumn( + name: "EndDate", + table: "PastVisit", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + + migrationBuilder.AlterColumn( + name: "IssueDate", + table: "PastVisa", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + + migrationBuilder.AlterColumn( + name: "ExpirationDate", + table: "PastVisa", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + + migrationBuilder.AlterColumn( + name: "Passport_IssueDate", + table: "Applicant", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + + migrationBuilder.AlterColumn( + name: "Passport_ExpirationDate", + table: "Applicant", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + + migrationBuilder.AlterColumn( + name: "BirthDate", + table: "Applicant", + type: "timestamp with time zone", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "timestamp without time zone"); + } + } +} diff --git a/SchengenVisaApi/Infrastructure/Migrations/DatabaseContextModelSnapshot.cs b/SchengenVisaApi/Infrastructure/Migrations/DatabaseContextModelSnapshot.cs index 78425cb..60b4216 100644 --- a/SchengenVisaApi/Infrastructure/Migrations/DatabaseContextModelSnapshot.cs +++ b/SchengenVisaApi/Infrastructure/Migrations/DatabaseContextModelSnapshot.cs @@ -29,7 +29,7 @@ namespace Infrastructure.Migrations .HasColumnType("uuid"); b.Property("BirthDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("Citizenship") .IsRequired() @@ -157,7 +157,7 @@ namespace Infrastructure.Migrations .HasColumnType("boolean"); b.Property("RequestDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b.Property("RequestedNumberOfEntries") .HasColumnType("integer"); @@ -288,10 +288,10 @@ namespace Infrastructure.Migrations .HasColumnType("uuid"); b1.Property("ExpirationDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.Property("IssueDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.Property("Issuer") .IsRequired() @@ -391,10 +391,10 @@ namespace Infrastructure.Migrations NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property("Id")); b1.Property("ExpirationDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.Property("IssueDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.Property("Name") .IsRequired() @@ -428,10 +428,10 @@ namespace Infrastructure.Migrations .HasColumnType("character varying(70)"); b1.Property("EndDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.Property("StartDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.HasKey("VisaApplicationId", "Id"); @@ -447,7 +447,7 @@ namespace Infrastructure.Migrations .HasColumnType("uuid"); b1.Property("ExpirationDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.Property("Issuer") .IsRequired() @@ -469,7 +469,7 @@ namespace Infrastructure.Migrations .HasColumnType("uuid"); b1.Property("ExpirationDate") - .HasColumnType("timestamp with time zone"); + .HasColumnType("timestamp without time zone"); b1.Property("Number") .IsRequired() diff --git a/SchengenVisaApi/SchengenVisaApi/DependencyInjection.cs b/SchengenVisaApi/SchengenVisaApi/DependencyInjection.cs index 3af50a0..649ca7d 100644 --- a/SchengenVisaApi/SchengenVisaApi/DependencyInjection.cs +++ b/SchengenVisaApi/SchengenVisaApi/DependencyInjection.cs @@ -28,7 +28,7 @@ public static class DependencyInjection AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); builder.Services - .AddInfrastructure(config, environment.IsDevelopment()) + .AddInfrastructure(config) .AddApplicationLayer(environment.IsDevelopment()) .AddAuth(config) .AddPresentation(environment); diff --git a/SchengenVisaApi/SchengenVisaApi/Program.cs b/SchengenVisaApi/SchengenVisaApi/Program.cs index dfb3da1..7338d4e 100644 --- a/SchengenVisaApi/SchengenVisaApi/Program.cs +++ b/SchengenVisaApi/SchengenVisaApi/Program.cs @@ -1,17 +1,36 @@ +using Infrastructure.Database; +using Microsoft.EntityFrameworkCore; + namespace SchengenVisaApi; #pragma warning disable CS1591 public class Program { - public static void Main(string[] args) + private const string MigrationKey = "--migrate"; + + public static async Task Main(string[] args) { var builder = WebApplication.CreateBuilder(args); builder.RegisterServices(); var app = builder.Build(); + + await HandleMigrationKey(args, app); + app.ConfigurePipelineRequest(); - app.Run(); + await app.RunAsync(); + } + + private static async Task HandleMigrationKey(string[] args, WebApplication app) + { + if (args.Contains(MigrationKey)) + { + using var scope = app.Services.CreateScope(); + await using var context = scope.ServiceProvider.GetRequiredService(); + await context.Database.MigrateAsync(); + Environment.Exit(0); + } } } #pragma warning restore CS1591 diff --git a/SchengenVisaApi/SchengenVisaApi/appsettings.json b/SchengenVisaApi/SchengenVisaApi/appsettings.json index 7fa8b37..e559df4 100644 --- a/SchengenVisaApi/SchengenVisaApi/appsettings.json +++ b/SchengenVisaApi/SchengenVisaApi/appsettings.json @@ -7,9 +7,10 @@ }, "AllowedHosts": "*", + "urls": "http://localhost:5003;https://localhost:7168", + "ConnectionStrings": { - "developmentDB": "Host=localhost;Port=5432;Database=visa;Username=postgres;Password=Qwerty123456!", - "normal'naya db": "" + "connectionString": "Host=localhost;Port=5432;Database=visa;Username=postgres;Password=Qwerty123456!" }, "JwtSettings": {