LinqToSQL _conn ? LinqToSQL 连接?
这是一个代码:
using System;
using Nemerle.Collections;
using Nemerle.Text;
//using Nemerle.Utility;
using System.Linq;
using Nemerle.Data.Linq;
using NUnit.Framework;
using System.Data.Linq;
namespace LinqTestes
{
[TestFixture]
public class Linq2SqlTests
{
static ReadConnectionString() : string
{
def currAssm = Uri(typeof(Linq2SqlTests).Assembly.CodeBase).LocalPath;
def path = IO.Path.GetDirectoryName(currAssm);
def connStrPath = IO.Path.Combine(path, "connectionString.txt");
def connStr =
try { IO.File.ReadAllText(connStrPath, Text.Encoding.UTF8) }
catch { | e is IO.FileNotFoundException =>
throw IO.FileNotFoundException(
$"You should define connection string to NorthWind DB in: '$connStrPath'",
e.FileName, e) };
connStr
}
_conn : LinqDataConnection = LinqDataConnection(ReadConnectionString());
我正在做同样的事情,但是 LinqDataConnection 类型是什么?它从哪里来?
here is a code :
using System;
using Nemerle.Collections;
using Nemerle.Text;
//using Nemerle.Utility;
using System.Linq;
using Nemerle.Data.Linq;
using NUnit.Framework;
using System.Data.Linq;
namespace LinqTestes
{
[TestFixture]
public class Linq2SqlTests
{
static ReadConnectionString() : string
{
def currAssm = Uri(typeof(Linq2SqlTests).Assembly.CodeBase).LocalPath;
def path = IO.Path.GetDirectoryName(currAssm);
def connStrPath = IO.Path.Combine(path, "connectionString.txt");
def connStr =
try { IO.File.ReadAllText(connStrPath, Text.Encoding.UTF8) }
catch { | e is IO.FileNotFoundException =>
throw IO.FileNotFoundException(
$"You should define connection string to NorthWind DB in: '$connStrPath'",
e.FileName, e) };
connStr
}
_conn : LinqDataConnection = LinqDataConnection(ReadConnectionString());
and I'm making the same but what is LinqDataConnection type ? and where does it comes from ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
LinqDataConnection
是特定于他们创建的 nemerle 项目的类型。您可以在此处查看其工作原理:Nemerle SVN (注意:他们的网站目前似乎存在网关问题)
LinqDataConnection
is a type specific to the nemerle project they've created. You can see how it works here:Nemerle SVN (Note: their site seems to be having gateway issues at the moment)