Difference between revisions of "MySql Dotnet core Implementation with SapientGuardian"

From Logic Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 26: Line 26:
 
== For Core 2.0 follow  ==
 
== For Core 2.0 follow  ==
 
[https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql]
 
[https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql]
 +
 +
[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

Video of Implementation


Free MySql Hosting

for 5 Mb of free MySql Hosting https://www.freemysqlhosting.net