Skip to content

Commit

Permalink
cleaner schema names
Browse files Browse the repository at this point in the history
  • Loading branch information
iammukeshm committed Feb 21, 2025
1 parent 95f7672 commit c5567fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace FSH.Framework.Infrastructure.Persistence;
namespace Shared.Constants;
public static class SchemaNames
{
public const string Todo = "todo";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Shared.Constants;

namespace FSH.Starter.WebApi.Catalog.Infrastructure.Persistence;

Expand All @@ -22,7 +23,7 @@ public CatalogDbContext(IMultiTenantContextAccessor<FshTenantInfo> multiTenantCo
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ArgumentNullException.ThrowIfNull(modelBuilder);
base.OnModelCreating(modelBuilder);
base.OnModelCreating(modelBuilder);
modelBuilder.ApplyConfigurationsFromAssembly(typeof(CatalogDbContext).Assembly);
modelBuilder.HasDefaultSchema(SchemaNames.Catalog);
}
Expand Down
1 change: 1 addition & 0 deletions src/api/modules/Todo/Persistence/TodoDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Shared.Constants;

namespace FSH.Starter.WebApi.Todo.Persistence;
public sealed class TodoDbContext : FshDbContext
Expand Down

0 comments on commit c5567fc

Please sign in to comment.