现在的主要任务是在权限认证一块要完成mentor的任务和想法,首先我想应该把provider理解的更深刻一些。于是有一本要看的官方教材叫Oracle Providers for asp.net
1. .net Dataaccess provides Oracle Data Provider and Oracle Providers for .net
Oracle data provider 可以获得读写数据库的接口,其库为Oracle.Dataaccess。其包括oralce.Dataaccess.client 和oracle.Dataaccess.Types. 前者提供客户端访问的接口,后者提价Providers.
前者包括OracleConnection, OracleCommand ,OracleDataadapter(用fill和update实现Dataset与数据库的交互),OracleDataReader
Using ODP.NET Client Provider in a Simple Application
The following is a simple C# application that connects to Oracle Database and displays
its version number before disconnecting:
// C#
using System;
using Oracle.DataAccess.Client;
class Sample
{
static void Main()
{
// Connect to Oracle
string constr = "User Id=scott;Password=tiger;Data Source=oracle";
OracleConnection con = new OracleConnection(constr);
con.Open();
// Display Version Number
Console.WriteLine("Connected to Oracle " + con.ServerVersion);
// Close and Dispose OracleConnection
con.Close();
con.Dispose();
}
}
2. Oracle providers介绍:
These ASP.NET services are data-source independent, but they can be configured to use a particular ASP.NET provider, which is implemented specifically to store and retrieve data from a specific data source. The data means application state, such as shopping cart or user information.
Membership Provider Overview of Oracle Providers for ASP.NET 1-2 Oracle Providers for ASP.NET Developer's Guide
■ Role Provider
■ Site Map Provider
■ Session State Provider
■ Profile Provider
■ Web Event Provider
■ Web Parts Personalization Provider
■ Cache Dependency Provider
其特点是已经忽略了如何访问数据库的细节操作,只需要配置使用哪个数据库连接,并应用所提供的接口即可。