是否可以在LinqToSql中使用Soundex(或其他SQL函数)?

时间:2008-09-30 17:47:40

标签: linq-to-sql soundex

我正在重构当前在存储过程中实现的一些代码,以使用LinqToSql(用于训练)。是否可以在linqToSql查询中使用SQL函数?

2 个答案:

答案 0 :(得分:1)

以下是MSDN论坛帖子中的一些有用信息。 Soundex and LINQ

答案 1 :(得分:0)

我自己还没有尝试过,但下面的方法originally posted here似乎是最好的解决方案。

    [Function(Name="SoundEx", IsComposable = true)]
    public string SoundsLike(string input)
    {
        throw new NotImplementedException();
    }