This project is read-only.

Identity in a multi-tier environment

Jan 17, 2014 at 1:05 PM
Edited Jan 17, 2014 at 1:51 PM
First off, for reference: How to use Identity membership with existing database (n-tier)

I was wondering if there is a way (or plans) to make identity play well in a multi-tier environment? As it stands, it looks like the whole structure is marries to the Microsoft.AspNet.Identity.* libraries (and I dislike having to couple multiple libraries that much). Is there any way to do this in a fashion that allows having business objects and membership in one place without the references? Or are you faced with including the Microsoft.aspNet.Identity.* reference in both the WebUI & the Data layer?

Kind regards,
Brad Christie
Jul 24, 2014 at 5:52 AM
I had the same question some time ago, and my best bet was to put Identity in a separate project.
Then only reference in your WebUI application.

I didn't went that route yet, but I'm pretty sure you will have 2 DbContext one for identity, one for everything else (which can include the tables from the Identity DbContext)

Take a look at this blog post it may help you.