This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// View+PositionSticky.swift | |
// App | |
// | |
// Created by Eliott Robson on 22/03/2024. | |
// | |
import SwiftUI | |
extension View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ISpecification<T> where T : class | |
{ | |
Expression<Func<T, bool>> Predicate { get; } | |
bool IsSatisfiedBy(T entity); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Reduces boolean expressions to improve performance with generated queries. | |
/// <example> | |
/// For example: | |
/// <code> | |
/// Expression<Func<User, FollowingData>> projection = u => new FollowingData | |
/// { | |
/// UserId = u.Id, | |
/// FollowersCount = u.Followers.Count, | |
/// IsFollowing = currentUserId.HasValue && u.Following.Any(f => f.UserId == currentUserId.Value) |