简体   繁体   中英

Is OWIN only for ASP.net Identity? Can't we use owin context to query our application db?

I am very new to EF, ASP.Net MVC, ASP.net Identity etc.

I am creating a simple e-commerce website for learning above mentioned stuff. My query is, how can I query the application database?

Is OWIN context only used for ASP.net Identity?

Yes, that context should only be used for asp.net identity

OWIN and asp.net identity are completely separate concepts :

ASP.Net Identity : This framework is used for user management/authentication mechanism etc. For more detail please Follow this link

OWIN : Owin defines an abstraction between .NET web servers and web applications. By decoupling the web server from the application, OWIN makes it easier to create middleware for .NET web development. Also, OWIN makes it easier to port web applications to other hosts—for example, self-hosting in a Windows service or other process. For more information follow this link

Now what you are trying to do is that you want to use entity framework to query the database in various scenarios. So for that you should create a custom context, define your schema in it and do whatever query you want to do over that.

To know more about entity framework you can start from here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM