Example #1
0
 /// <summary>
 /// Filters the current projection to include only primary key attributes.
 /// </summary>
 /// <param name="projection">The current projection</param>
 /// <returns>A new projection containing the filtered attributes.</returns>
 public static IProjection Key(this IProjection projection) => projection.Filter(a => a.Metadata.HasFlag(ReferenceMetadataFlags.PrimaryKey));
Example #2
0
 /// <summary>
 /// Filters the current projection to include only primary key attributes.
 /// </summary>
 /// <param name="projection">The current projection</param>
 /// <returns>A new projection containing the filtered attributes.</returns>
 public static IProjection NonKey(this IProjection projection) => projection.Filter(a => !a.Metadata.HasAnyFlag(ReferenceMetadataFlags.Key));
Example #3
0
 /// <summary>
 /// Filters the current projection to include only output attributes.
 /// </summary>
 /// <param name="projection">The current projection</param>
 /// <returns>A new projection containing the filtered attributes.</returns>
 public static IProjection Out(this IProjection projection) => projection.Filter(a => a.Metadata.HasFlag(ProjectionMetadataFlags.Output));