Ejemplo n.º 1
0
        protected internal virtual Lite <Entity> FindUnique(UniqueOptions options)
        {
            var queryDescription = DynamicQueryManager.Current.QueryDescription(options.QueryName);

            FilterOption.SetFilterTokens(options.FilterOptions, queryDescription, canAggregate: false);
            OrderOption.SetOrderTokens(options.OrderOptions, queryDescription, canAggregate: false);

            var request = new UniqueEntityRequest
            {
                QueryName  = options.QueryName,
                Filters    = options.FilterOptions.Select(f => f.ToFilter()).ToList(),
                Orders     = options.OrderOptions.Select(o => o.ToOrder()).ToList(),
                UniqueType = options.UniqueType,
            };

            return(DynamicQueryManager.Current.ExecuteUniqueEntity(request));
        }
Ejemplo n.º 2
0
 public static Lite <Entity> FindUnique(UniqueOptions options)
 {
     return(Manager.FindUnique(options));
 }