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
andStarts|Ends/With
are implemented usingLIKE
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);