如何实现便携式数据访问层 [英] How to implement a Portable Data access Layer

查看:78
本文介绍了如何实现便携式数据访问层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我想使其更便携。基本上我的应用程序就像只使用sql server一样,我想做的是让它可以与所有其他DBMS系统一起使用。我只是想知道使用正确的O.O.P设计和实现来实现这一目标的最佳方法。



先谢谢你们。

I have an application which I would like to make more portable. Basically my application works like a treat using just sql server, what I would like to do is make it usable with all the other DBMS systems out there. I'm just wondering the best way to achieve this using the correct O.O.P design and implementation.

Thanks in advance guys.

推荐答案

利用接口:IDbConnection,IDbCommand,IDataParameter,IDataReader而不是而不是使用特定的类。

但你仍然需要处理SQL语法的差异或坚持只使用标准语法。
Leverage the Interfaces: IDbConnection, IDbCommand, IDataParameter, IDataReader rather than using the specific classes.
But you'll still have to deal with differences in SQL syntax or stick to only standard syntax.


这篇关于如何实现便携式数据访问层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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