Skip to content

Asp.net mvc 5 with implemention of Identity 2.0 PostGreSQL and Entityframwork 6.

Notifications You must be signed in to change notification settings

ashutoshkushawaha/PostGreSql_Identity2.0_EntityFramework6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PostGreSql_Identity2.0_EntityFramework6

Asp.net mvc 5 with implemention of Identity 2.0 PostGreSQL and Entityframwork 6.

postgresql setup in mvc project

1.in webconfig add this <system.data> </system.data>

  1. EntityFramework6.Npgsql PostgreSQL provider for Entity Framework. install it from nuget.

  2. Npgsql Npgsql is the open source .NET data provider for PostgreSQL. install it from nuget.

  3. Asp.identity 2.0 in postgresql

public class SampleDbContext: IdentityDbContext { public SampleDbContext() : base("Conn") { Database.SetInitializer(null); } public virtual DbSet<sys_user> SYS_USER { get; set; } public virtual DbSet Company { get; set; } public static SampleDbContext Create() { return new SampleDbContext(); } }

5. enable-migration to add migration folder 
6. add-migration "meaningfull name" to add migration 
7. update-database -verbose

About

Asp.net mvc 5 with implemention of Identity 2.0 PostGreSQL and Entityframwork 6.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages