altyn
altyn
CC#
Created by altyn on 12/22/2023 in #help
ASP.NET get requests
No description
5 replies
CC#
Created by altyn on 12/17/2023 in #help
✅ Suggested pdf library
For generating a pdf for contract documents, has anyone used any libs? I see aspose.net, iTextSharp,PdfSharp
3 replies
CC#
Created by altyn on 11/10/2023 in #help
Issues with EFCore
Hello everyone, I am trying to use ApplyConfigurationsFromAssembly but it seems to not be finding any configurations
modelBuilder.ApplyConfigurationsFromAssembly(typeof(UserConfiguration).Assembly);
modelBuilder.ApplyConfigurationsFromAssembly(typeof(UserConfiguration).Assembly);
Instead, I have to apply configurations like this
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
// Call the base OnModelCreating
base.OnModelCreating(modelBuilder);

new PermissionConfiguration().Configure(modelBuilder.Entity<Permission>());
new RoleConfiguration().Configure(modelBuilder.Entity<Role>());
new UserConfiguration().Configure(modelBuilder.Entity<User>());
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
// Call the base OnModelCreating
base.OnModelCreating(modelBuilder);

new PermissionConfiguration().Configure(modelBuilder.Entity<Permission>());
new RoleConfiguration().Configure(modelBuilder.Entity<Role>());
new UserConfiguration().Configure(modelBuilder.Entity<User>());
}
and to apply them in correct order or migrations won't work, I am not sure what could be causing this issue, I have a clean architecture solution split into multiple projects. Could anyone point me to the right direction?
8 replies