建立以亚音速于SQL Server等数据库 [英] Setting up SubSonic with Databases other than SQL Server

查看:139
本文介绍了建立以亚音速于SQL Server等数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的亚音速(2.2和3)对一些ASP.NET项目,并设法让他们与SQL Server的工作(使用ActiveRecord)。不过,我也想知道如何与其他(开源)的数据库,例如将其设置PostgreSQL和SQLite的。这让我可以用它的Web主机上不上的SQL Server。我已经找到了供应商是:

I am currently using SubSonic (2.2 and 3) for some ASP.NET projects and have managed to get them working with SQL Server (using ActiveRecord). However, I also want to know how to set it up with other (open source) databases, e.g. PostgreSQL and SQLite. This is so I can use it on a web host without SQL Server on. The providers I have found are:

  • PostgreSQL: Npgsql
  • SQLite: System.Data.SQLite or Mono.Data.SqliteClient (if it works with Microsoft.NET)

任何人有任何经验亚音速知道如何做到这一点(一些示例演示将是一件好事 - 只是查询一个基本的底就可以了)? Non-ASP.NET MVC但(没有坐进它尚未)。我只有SQLite的(基本上使用SQLite经理在Firefox和通过PHP数据对象查询的话)的基本知识,并没有使用PostgreSQL的,但相信它会比SQLite的更具可扩展性。

Anyone have any experience with SubSonic know how to do this (some sample demo would be good - just a basic primer on querying would be fine)? Non-ASP.NET MVC though (not got into it yet). I have only basic knowledge of SQLite (basically using SQLite Manager in Firefox and querying it via PHP Data Objects) and have not used Postgresql, but assume it would be more scalable than SQLite.

推荐答案

有关第3版


  • PostgreSQL的:有没有对目前的Postgres任何模板,所以你需要创建自己的模板

  • PostgreSQL: There aren't any templates for postgres at the moment so you'd need to create the templates yourself

SQLite的 - 这些步骤应该如下:

SQLite - The steps should be as follows:


  • 添加一个引用到System.Data.SQLite

  • 查找该文件夹TemplateProviders,你会发现一个SQLite.ttinclude,你需要拖放到你的项目,而不是SQLServer.ttinclude。

  • 更改引用SQLServer.ttinclude的.TT文件引用SQLite.ttinclude来代替。

这篇关于建立以亚音速于SQL Server等数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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