LinqToSql _conn? LinqToSQLConnection?
-
20-09-2019 - |
Pregunta
aquí es un código:
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());
y estoy haciendo lo mismo pero ¿cuál es el tipo LinqDataConnection? y de dónde viene?
Solución
LinqDataConnection
es un tipo específico al proyecto Nemerle que han creado. Se puede ver cómo funciona aquí:
Nemerle SVN (Nota: su sitio parece estar teniendo problemas de puerta de enlace por el momento)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow