开发者

LinqToSQL _conn ? LinqToSQLConnection?

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 { |开发者_Go百科 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 ?


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜