Extensions IQueryable library used in projects created by the Code Generator tool.
This project contains iqueryable extension methods and is used in projects generated by the Tolitech Code Generator tool.
Tolitech Code Generator Tool: http://www.tolitech.com.br
Examples:
public class EmailValueObject : IValueObject
{
public string? Email { get; set; }
}
public class PersonEntity : IEntity
{
public PersonEntity(string name, int age, string email)
{
PersonId = Guid.NewGuid();
Name = name;
Age = age;
Email = new EmailValueObject { Email = email };
}
public Guid PersonId { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public EmailValueObject Email { get; set; }
}
var items = new List<PersonEntity>();
items.Add(new PersonEntity($"Name 1", 31, $"test@test.com"));
items.Add(new PersonEntity($"Name 2", 30, $"test@test.com"));
items.Add(new PersonEntity($"Name 3", 32, $"test@test.com"));
var people = items
.AsQueryable()
.DynamicOrderBy("Email.Email:asc, Age:desc")
.ToList();