Fixed endpoints for /users and /messages.
This commit is contained in:
@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
|
||||
namespace MessengerBroker.Db.Sql.Migrator
|
||||
{
|
||||
public partial class DesignTimeDbContextFactory : IDesignTimeDbContextFactory<BrokerSqlDbContext>
|
||||
{
|
||||
public BrokerSqlDbContext CreateDbContext(string[] args)
|
||||
{
|
||||
return new BrokerSqlDbContext(CONNECTION_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MessengerBroker.Db.Sql\MessengerBroker.Db.Sql.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
11
code/MessengerBroker.Db.Sql.Migrator/Program.cs
Normal file
11
code/MessengerBroker.Db.Sql.Migrator/Program.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace MessengerBroker.Db.Sql.Migrator
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Add-Migration Initial -Project MessengerBroker.Db.Sql -StartupProject MessengerBroker.Db.Sql.Migrator -Verbose -Context BrokerSqlDbContext
|
||||
// Update-Database -Project MessengerBroker.Db.Sql -StartupProject MessengerBroker.Db.Sql.Migrator -Verbose -Context BrokerSqlDbContext
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user