Difference between revisions of "MySql Dotnet core Implementation with SapientGuardian"
From Logic Wiki
(→For Core 2.0 follow) |
|||
| Line 28: | Line 28: | ||
[https://www.youtube.com/watch?v=qTnT069Owkc Video of Implementation] | [https://www.youtube.com/watch?v=qTnT069Owkc Video of Implementation] | ||
| + | |||
| + | |||
| + | == Free MySql Hosting == | ||
| + | for 5 Mb of free MySql Hosting [https://www.freemysqlhosting.net https://www.freemysqlhosting.net] | ||
Latest revision as of 12:48, 24 January 2018
install SapientGuardian.EntityFrameworkCore.MySql nuget package
Install-Package SapientGuardian.EntityFrameworkCore.MySql
In Startup.cs file include
using MySQL.Data.Entity.Extensions;
and
services.AddDbContext<MonkyDbContext>(options =>
options.UseMySQL(Configuration.GetConnectionString("DefaultConnection"),
optionsBuilder => optionsBuilder.MigrationsAssembly("Monky.API")));
in DbContext implementation
public class MonkyDbContext : IdentityDbContext
{
public MonkyDbContext(DbContextOptions<MonkyDbContext> options)
: base(options)
{
}
For Core 2.0 follow
https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql
Free MySql Hosting
for 5 Mb of free MySql Hosting https://www.freemysqlhosting.net