Skip to content

Database (and Server) Is Created Every Time #5474

Answered by ryanheath
Mike-E-angelo asked this question in Q&A
Discussion options

You must be logged in to vote

Try something like this, here we use sqlserver.

IResourceBuilder<SqlServerServerResource> sqlServer;
if (builder.ExecutionContext.IsPublishMode)
{
    sqlServer = builder.AddSqlServer(SqlServerName);
}
else
{
    sqlServer = builder.AddSqlServer(SqlServerName)
        .WithDataVolume();
}

// Ryan

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@davidfowl
Comment options

@Mike-E-angelo
Comment options

Answer selected by Mike-E-angelo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants