Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3 tier application with Identity and EF

I am developing a 3-tier project with authentication from scratch. I am using the following as a guide for implementing Identity authentication: http://bitoftech.net/2015/01/21/asp-net-identity-2-with-asp-net-web-api-2-accounts-management/

The issue is that I am required to install the following NuGet packages:

Install-Package Microsoft.AspNet.Identity.Owin -Version 2.1.0
Install-Package Microsoft.AspNet.Identity.EntityFramework -Version 2.1.0
Install-Package Microsoft.Owin.Host.SystemWeb -Version 3.0.0
Install-Package Microsoft.AspNet.WebApi.Owin -Version 5.2.2
Install-Package Microsoft.Owin.Security.OAuth -Version 3.0.0
Install-Package Microsoft.Owin.Cors -Version 3.0.0

I intuitively installed Microsoft.AspNet.Identity.Owin into my Presentation Layer and now the dilemma, Microsoft.AspNet.Identity.EntityFramework where does it go? I already installed EF6 into the Data Access Layer, is there a way to provide this dependency to Microsoft.AspNet.Identity.EntityFramework in the Presentation Layer?

like image 532
Thufir Hawat Avatar asked Apr 04 '15 00:04

Thufir Hawat


People also ask

What is a 3-tier architecture project?

Three-tier architecture is a well-established software application architecture that organizes applications into three logical and physical computing tiers: the presentation tier, or user interface; the application tier, where data is processed; and the data tier, where the data associated with the application is ...

What is dal and BAL in asp net?

BAL = Business Application Layer. DAL = Data Access Layer.

What is Entity Framework Core?

Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology. EF Core can serve as an object-relational mapper (O/RM), which: Enables . NET developers to work with a database using . NET objects.


1 Answers

It should go into your web project.

Microsoft.AspNet.Identity.EntityFramework is a namespace that provides classes to easily hookup an identity project to Entity Framework. It doesn't actually provide anything for EF itself.

If you chose to use a different ORM or if you wanted to fully customize asp.net identity (say, make your own UserStore), you wouldn't even include that package in your project.

like image 63
James Sampica Avatar answered Sep 18 '22 16:09

James Sampica