共有 0 个贴子
没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > sugarclient |
sugarclient
|
0 | 0 | 25 |
贡献者 | 讨论 | 代码提交 |
This povides set of classes in the namespace of "System.Data.SugarClient", To access Sugar Data in ADO.NET way.
For example SugarConnection implements IDbConnection interface. It provides connection to the Sugar Instance over SOAP.
sample code:
using(IDbConnection con = new SugarConnection("Data Source=http://host/sugarcrm/;User ID=admin;Password=foo")){
con.Open(); // this performs logging in to sugar.
IDbCommand cmd = con.CreateCommand();
cmd.CommandText = "SELECT * FROM Contacts"; // This statement will fetch all records from Contacts module.
IDataReader reader = cmd.ExecuteReader();
// process data here
con.Close(); // logout
}