Rowin ツ
Rowin ツ
Explore posts from servers
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
but that should be prefix
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
god i keep using suffix
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
public EditorDbContext(DbContextOptions<EditorDbContext> options, EditorDbContextConfig config)
: base(options)
{
_tablePrefix = config.TablePrefix ?? throw new ArgumentNullException(nameof(config.TablePrefix));
}
public EditorDbContext(DbContextOptions<EditorDbContext> options, EditorDbContextConfig config)
: base(options)
{
_tablePrefix = config.TablePrefix ?? throw new ArgumentNullException(nameof(config.TablePrefix));
}
You mean something like this?
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
What do you mean exactly?
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
I need need a new context every call with supplied prefix
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
but yeah that is the case
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
i though that was a suffix
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
InvalidOperationException: Error while validating the service descriptor 'ServiceType: EditorApi.DbContexts.EditorDbContext Lifetime: Scoped ImplementationType: EditorApi.DbContexts.EditorDbContext': Unable to resolve service for type 'System.String' while attempting to activate 'EditorApi.DbContexts.EditorDbContext'.
InvalidOperationException: Error while validating the service descriptor 'ServiceType: EditorApi.DbContexts.EditorDbContext Lifetime: Scoped ImplementationType: EditorApi.DbContexts.EditorDbContext': Unable to resolve service for type 'System.String' while attempting to activate 'EditorApi.DbContexts.EditorDbContext'.
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
Same, yet
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
Yup
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
Because our company said so
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
What do you mean?
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
public class EditorDbContextFactory : IEditorDbContextFactory
{
private readonly DbContextOptions<EditorDbContext> _options;

public EditorDbContextFactory(DbContextOptions<EditorDbContext> options)
{
_options = options;
}

public EditorDbContext CreateDbContext(string tableSuffix)
{
return new EditorDbContext(_options, tableSuffix);
}
}
public class EditorDbContextFactory : IEditorDbContextFactory
{
private readonly DbContextOptions<EditorDbContext> _options;

public EditorDbContextFactory(DbContextOptions<EditorDbContext> options)
{
_options = options;
}

public EditorDbContext CreateDbContext(string tableSuffix)
{
return new EditorDbContext(_options, tableSuffix);
}
}
33 replies
CC#
Created by Rowin ツ on 6/19/2024 in #help
Database suffix builder
public interface IEditorDbContextFactory
{
EditorDbContext CreateDbContext(string tableSuffix);

}
public interface IEditorDbContextFactory
{
EditorDbContext CreateDbContext(string tableSuffix);

}
33 replies
CC#
Created by Rowin ツ on 6/7/2024 in #help
Docker container not port forwarding
And now it works
82 replies
CC#
Created by Rowin ツ on 6/7/2024 in #help
Docker container not port forwarding
I redid everything, even generated a new certificate
82 replies
CC#
Created by Rowin ツ on 6/7/2024 in #help
Docker container not port forwarding
Well I think ive managed to solve the problem
82 replies
CC#
Created by Rowin ツ on 6/7/2024 in #help
Docker container not port forwarding
or am i overlooking something
82 replies
CC#
Created by Rowin ツ on 6/7/2024 in #help
Docker container not port forwarding
thats what I did no?
82 replies
CC#
Created by Rowin ツ on 6/7/2024 in #help
Docker container not port forwarding
82 replies