如何创建通用方法以C#语言插入数据库 [英] How to create a genric method to insert in Database in C# language

查看:65
本文介绍了如何创建通用方法以C#语言插入数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,您能告诉我在数据库中插入,删除和更新的通用方法吗.

Hi can u please tell me is there any genric method for inserting, deleting and updating into database.

推荐答案

我不确定我是否完全理解您的问题,但您可以查看企业库 [
I m not really sure if i fully understand your question, but you could take a look to Enterprise Library[^].

The Data Access Application Block provides access to the most frequently used features of ADO.NET, exposing them through easily used classes. In some cases, application blocks also add related functionality not directly supported by the underlying class libraries.


我写了一个技巧,适用于从Web服务检索数据,但是您可以轻松地将概念转换为您的特定(且陈述不明确)的需求(包括写入数据库).

将动态参数列表传递到Web服务 [ ^ ]
I wrote a tip that applies to retrieving data from a web service, but you could easily convert the concept to your specific (and poorly stated) needs (including writing to the database).

Pass Dynamic List of Parameters to Web Service[^]


这篇关于如何创建通用方法以C#语言插入数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆