Today I need some suggestion with one of the issue I am current struggling with
I am working on a project which has 3 layers
1) DAL
2) BAL
3) Web
4) Entities (This is a separate project which contain only the entities
that will be use to create DB tables with EF Code first)
Entities being reference in all the 3 layers
DAL being referenced in BAL and Web
BAL being referenced in Web
I want to get DAL
reference out from Web
project, my Web
project usually talk with BAL
all the time. The only reason I have to referenced DAL
because of ASP.NET Identity
Startup.Auth.cs
and IdentityConfig.cs
classes. Each of the file contain a single line of code that need an access to my DBContext
which resides inside my DAL
project.
IdentityConfig.cs:
var manager = new ApplicationUserManager
(new UserStore<ApplicationUser>(context.Get<MyDbContext>()));
Startup.Auth.cs:
app.CreatePerOwinContext(MyDbContext.Create);
How could I possible adjust things that I don't have to reference DAL inside Web project? Can you please suggest
Thanks