using Exam.Infrastructure.Data.Entity;
using SqlSugar;
using XF.Domain.Entities;

namespace Hotline.Application.Exam.Core.Extensions
{
    public static class ExpressionableExtensions
    {
        public static EntityQueryRequest ToEntityQueryRequest<T>(this Expressionable<T> expressionable) where T:class,IEntity<string>,new()
        {
            var entityQueryRequest = new EntityQueryRequest
            {
                Expression = expressionable.ToExpression()
            };

            return entityQueryRequest;
        }
    }
}
