Closed kavics closed 1 month ago
Create a LINQ provider for the Client.NET. Example codes:
var user = repository.Content .OfType<User>() .Where(u => u.LoginName.Contains("john")) .FirstOrDefault();
var articles = repository.Content .OfType<Article>() .Where(a=> a.InTree("/Root/Content/Articles")) .OrderByDescending(a => a.CreationDate) .Take(5) .ToArray();
var users = repository.Content .EnableAutofilters() .CountOnly() .DisableLifespan() .Where(c => c.Id < 100 && c is User) .OfType<User>() .Select(u => Content.Create<User>( u.Id, u.Domain, u.LoginName, u.Email, u.Manager.Id, u.Manager.Type, u.Manager.Path, u.Manager.FullName, u.CreatedBy.Id, u.CreatedBy.Type, u.CreatedBy.Path, u.CreatedBy.FullName, u.ModifiedBy)) .ToArray();
Create a LINQ provider for the Client.NET. Example codes: