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

From Logic Wiki
Jump to: navigation, search
(Created page with "Category:MVC Category:SQL Category:Entity Framework Category:dotnet Category:core install '''SapientGuardian.EntityFrameworkCore.MySql''' nuget package I...")
 
 
(2 intermediate revisions by the same user not shown)
Line 22: Line 22:
 
         {
 
         {
 
         }
 
         }
 +
 +
 +
== For Core 2.0 follow  ==
 +
[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 11: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