Skip to content

Extensions IQueryable library used in projects created by the Code Generator tool.

License

Notifications You must be signed in to change notification settings

Tolitech/CodeGenerator.Extensions.IQueryable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tolitech.CodeGenerator.Extensions.IQueryable

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();

About

Extensions IQueryable library used in projects created by the Code Generator tool.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages