c# - EntityFramework 6 and mongodb and Identity -


i using webapi project , setup entityframework 6 mongodb.

i have setup mongodb database , entity framework code first model following link:

http://cdn.rssbus.com/help/dg1/ado/pg_efcodefirst.htm

now entity framework , asp.net identity 2 work based on mongodb. however, cannot find way ormodules allow it. found following explains uninstall entity framework.

https://github.com/g0t4/aspnet-identity-mongo

so know tuorial or have experiences enable mongodb ef code first , identity working with?

thanks,

ok found solution.

i not using ef anymore.

i using aspnet identity mongo v2 branch compiled.

https://github.com/inspectorit/mongodb.aspnet.identity/tree/v2

i using mongorepository repository of model.

https://github.com/robthree/mongorepository

and have developed dataservice manage models crud operations.

 public class dataservice {     public static mongorepository<modelclass> modelclass{ { return singleton<mongorepository<modelclass>>.instance; } }   }  public class singleton<t> t : class, new() {     singleton() { }      private static readonly lazy<t> instance = new lazy<t>(() => new t());      public static t instance { { return instance.value; } } } 

and good.

thanks,


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -