使用Silverlight操作ASPNETDB数据库
2010-01-14 16:04
351 查看
1.在Server端添加Silverlight-enabled WCF service
代码
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1
{
[OperationContract]
public void DoWork(string name,string pwd,string email,string question,string answer)
{
MembershipCreateStatus status;
Membership.CreateUser(name, pwd,email,question,answer,true,out status);
}
// Add more operations here and mark them with [OperationContract]
}
2. 添加此Service 引用到Silverlight
ServiceReference2.Service1Client client = new ServiceReference2.Service1Client();
client.DoWorkAsync("xxifusi", "xxifusi345","d22@we.com","q","a");
代码
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1
{
[OperationContract]
public void DoWork(string name,string pwd,string email,string question,string answer)
{
MembershipCreateStatus status;
Membership.CreateUser(name, pwd,email,question,answer,true,out status);
}
// Add more operations here and mark them with [OperationContract]
}
2. 添加此Service 引用到Silverlight
ServiceReference2.Service1Client client = new ServiceReference2.Service1Client();
client.DoWorkAsync("xxifusi", "xxifusi345","d22@we.com","q","a");
相关文章推荐
- SilverLight使用WCF RIA SERVICE实现对数据库的操作 (添加,删除,更新)
- zend framework 中使用dbadapter操作数据库的几种方法(持续更新)
- Laravel 数据库实例教程 —— 使用DB门面操作数据库
- Python:操作PostgreSQL数据库(使用DB API2.0)
- [置顶] Android数据库GreenDAO3.2.2的使用(三,GreenDao操作外部数据库----操作.db数据库)
- 使用Zend_Db_Adapter操作数据库
- Android中数据库操作框架DBFlow介绍与使用
- Python:操作PostgreSQL数据库(使用DB API2.0)
- Silverlight系列(4) 使用Web Service操作数据库
- 使用Eclipse插件DB viewer进行MySQL(SQL Server)等 数据库操作
- 【ci框架】CI 框架数据库操作函数 this->db->where() 的使用
- 关于Windows Phone数据库和Silverlight本地文件操作
- SqliteDB 操作数据库
- IOS数据库操作SQLite3使用详解
- SilverLight学习笔记--关于使用IValueConvert对绑定数据的格式化操作
- 使用 python 操作 access 数据库
- 在spring中使用SqlMapClientTemplate操作数据库
- 在myeclipse中配置DB Driver(数据库用MySql),并在myeclipse执行sql语句操作