2
public void ConfigureAuth(IAppBuilder app)
{
    Startup.DataProtectionProvider = app.GetDataProtectionProvider();
    app.CreatePerOwinContext(ApplicationDbContext.Create);
    app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);
    app.CreatePerOwinContext<ApplicationRoleManager>(ApplicationRoleManager.Create);
    app.CreatePerOwinContext<ApplicationCustomManager>(ApplicationCustomManager.Create);
}

I Need custom manager code for identity 2.0 in asp.net mvc.

Here i need tenant not for user but i have a table named site. I want site CURD handle by owin context.

I need any example of custom application manager code for any other entity except user and role.

1 Answer 1

0

Hope this gets you started

 public class ApplicationCustomManager : IDisposable
{
    public ApplicationCustomManager(ApplicationDbContext _applicationDbContext)
    {
        //do any operations as per your requirements with _applicationDbContext


    }
    public static ApplicationCustomManager Create(IdentityFactoryOptions<ApplicationCustomManager> options, IOwinContext context)
    {
        var _applicationCustomManager = new ApplicationCustomManager(context.Get<ApplicationDbContext>());
        return  _applicationCustomManager;
    }

    public void Dispose()
    {



    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.