/// <summary>
        /// Finds the medicine types that match the filter condition sorted as specified.
        /// </summary>
        /// <typeparam name="TSortProperty">The type of the property on the object that is the sort key.</typeparam>
        /// <param name="filter">The condition that filters the medicine types that need to be included.</param>
        /// <param name="sort">The condition that defines the sorting property.</param>
        /// <param name="sortDirection">Should the list be sorted ascending or descending.</param>
        /// <param name="pagingOptions">The options for pagination.</param>
        /// <param name="cancellationToken">A token that can be used to signal operation cancellation.</param>
        /// <returns>The sorted list of medicine types that match the filter.</returns>
        public virtual async Task <IPagedData <IMedicineType> > FindAsync <TSortProperty>(Expression <Func <IMedicineType, bool> > filter,
                                                                                          Expression <Func <IMedicineType, TSortProperty> > sort,
                                                                                          ListSortDirection sortDirection,
                                                                                          IPagingOptions pagingOptions,
                                                                                          CancellationToken cancellationToken)
            where TSortProperty : IComparable
        {
            Logger.LogInformation($"Finding {pagingOptions.PageSize} medicine types for page {pagingOptions.PageNumber}...");
            var paginatedResults = await PaginationUtility.FindAsync(LivestockContext.MedicineTypes,
                                                                     Mapper,
                                                                     filter,
                                                                     sort,
                                                                     sortDirection,
                                                                     pagingOptions,
                                                                     cancellationToken)
                                   .ConfigureAwait(false);

            Logger.LogDebug($"Found paged medicine types: {paginatedResults}");
            return(paginatedResults);
        }