What is a context?

后端 未结 4 1829
攒了一身酷
攒了一身酷 2021-01-31 02:55

It seems to me that a Context class is a control console whose object can invoke any included functions, such as Datacontext and DomainContext in WCF Ria service. Do I understan

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 03:27

    You can think about the context as a wrapper for related "things" such as HttpContext, DbContext, ObjectContext. i.e.: HttpContext contains any information you can reach for HTTP related operations.

    DbContext contains the methods and properties for database communication. Likewise ObjectContext.

    I would say it's a placeholder or container of related things for something.

提交回复
热议问题