github repo github stars

Database

Configure the database to work with the apps built with the Bit TodoTemplate.

Connection String

Open appsettings.json file in TodoTemplate.Server.Api project and change the ConnectionStrings connection string if you want.
"ConnectionStrings": {
    "SqlServerConnectionString": "Data Source=.; Initial Catalog=TodoTemplateDb;Integrated Security=true;Application Name=Todo;"
}
For Other Entityframework supported databases, you need to configure the context that provides your preferred database. with change UseSqlServer method on Api\Startup\Services.cs file.
services.AddDbContext<AppDbContext>(options =>
{
    options.UseSqlServer(configuration.GetConnectionString("SqlServerConnectionString"), sqlOpt =>
    {
        sqlOpt.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery);
    });
});

Migration

To create and migrate the database to the latest version. You can use Entity Framework's built-in tools for migrations. Open Package Manager Console in Visual Studio set TodoTemplate.Server.Api as the Default Project and run the Update-Database command as shown below:
Update-Database