Try .NET /elinq/
Powered by Try .NET

SQL Server String Functions

All string functions are fully supported and relevant are mappend to String methods and properties (Length, Concat, ToLower/Invariant, ToUpper/Invariant, Replace, Trim/Start|End, Contains, Starts|Ends/With, Substring). Of course all the SQL methods can be called directly as well.

Note, Contains and Starts|Ends/With are implemented using LIKE operator.

In addition strings can be freely concatenated:

var query = DbContext.ActorNames.Query((Actor actor, ActorName alias) =>
{
    var result = SELECT<ActorName>((actor.FirstName + " " + actor.LastName).ToUpper().@as(alias.FullName));
    FROM(actor);

    return result;
});

foreach (var actorName in query.Take(3))
    Console.WriteLine(actorName.FullName);

and interpolated using C# syntax:

var query = DbContext.ActorNames.Query((Actor actor, ActorName alias) =>
{
    var result = SELECT<ActorName>($"{actor.FirstName} {actor.LastName}".ToUpper().@as(alias.FullName));
    FROM(actor);

    return result;
});

foreach (var actorName in query.Take(3))
    Console.WriteLine(actorName.FullName);

< BACK | HOME