Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
akbaramd committed Dec 13, 2024
1 parent 79dceec commit 9d1308f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions Nezam.ESS.sln.DotSettings.user
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADbContextOptions_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0b7856b364e04283a10bb924825b197f28f228_003F39_003Ff800938c_003FDbContextOptions_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEfCoreBonRepository_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F253271a865924a8cb9e8881e1b2b838b13400_003F88_003F2dcb5262_003FEfCoreBonRepository_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEntityTypeBuilderExtensions_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F253271a865924a8cb9e8881e1b2b838b13400_003Fe3_003F8dbb6573_003FEntityTypeBuilderExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEventDefinition_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0b7856b364e04283a10bb924825b197f28f228_003Fa1_003F44c73e10_003FEventDefinition_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FLocal_003FSymbols_003Fsrc_003Fdotnet_003Fruntime_003F08338fcaa5c9b9a8190abb99222fed12aaba956c_003Fsrc_003Flibraries_003FSystem_002EPrivate_002ECoreLib_003Fsrc_003FSystem_003FRuntime_003FExceptionServices_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFuture_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FLocal_003FSymbols_003Fsrc_003Fdotnet_003Fruntime_003F08338fcaa5c9b9a8190abb99222fed12aaba956c_003Fsrc_003Flibraries_003FSystem_002EPrivate_002ECoreLib_003Fsrc_003FSystem_003FThreading_003FTasks_003FFuture_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIBonDbContextProvider_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F73926448008f4654ba366e96c5f78f0a13200_003F3f_003Fc0aa34cd_003FIBonDbContextProvider_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
Expand Down
Binary file removed Nezam.Modular.ESS.WebApi/NezamEes.db
Binary file not shown.
9 changes: 7 additions & 2 deletions Nezam.Modular.ESS.WebApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
builder.Services.AddInfrastructure();

// Add DbContext and configure it for SQLite
builder.Services.AddPayehDbContext<AppDbContext>(options =>
options.UseSqlite(builder.Configuration.GetConnectionString("DefaultConnection"))
builder.Services.AddPayehDbContext<AppDbContext>(
options =>
{
options.UseSqlite(builder.Configuration.GetConnectionString("DefaultConnection"),c=>c.MigrationsAssembly("Nezam.Modular.ESS.WebApi"));

}
);

// Configure request localization for Persian language
Expand Down Expand Up @@ -54,6 +58,7 @@
{
dbContext.Database.Migrate();
}
dbContext.Database.EnsureCreated();
}

app.UseAuthentication()
Expand Down
2 changes: 1 addition & 1 deletion Nezam.Modular.ESS.WebApi/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"DefaultConnection": "data source =192.168.200.7\\SQL2019;initial catalog=Nezam.EES;persist security info=True;user id=sa;password=vhdSAM@15114;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=True"
"DefaultConnection": "Data Source=NezamEes.db"
},
"Jwt": {
"SecretKey": "YourSecretKey12dl2393743598y3u46hij45h6478r823",
Expand Down
1 change: 1 addition & 0 deletions Nezam.Modular.ESS.infrastructure/Data/AppDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.EnableSensitiveDataLogging();

base.OnConfiguring(optionsBuilder);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public AppDbContext CreateDbContext(string[] args)
{
var optionsBuilder = new DbContextOptionsBuilder<AppDbContext>();

optionsBuilder.UseSqlServer($"data source =192.168.200.7\\\\SQL2019;initial catalog=Nezam.EES;persist security info=True;user id=sa;password=vhdSAM@15114;TrustServerCertificate=True");
optionsBuilder.UseSqlServer($"Data Source=../Nezam.Modular.ESS.WebApi/NezamEes.db");

var xtx = new AppDbContext(optionsBuilder.Options);
return xtx;
Expand Down

0 comments on commit 9d1308f

Please sign in to comment.