예제 #1
0
 public static bool IsUserKey(this IUserEntity entity, IKey userKey)
 => entity.UserId == userKey.AsStringKey().Identifier;
예제 #2
0
 public static T SetUserKey <T>(this T entity, IKey userKey) where T : IUserEntity
 {
     entity.UserId = userKey.AsStringKey().Identifier;
     return(entity);
 }
예제 #3
0
 public static IQueryable <T> WhereUserKey <T>(this IQueryable <T> query, IKey userKey) where T : IUserEntity
 => query.Where(e => e.UserId == userKey.AsStringKey().Identifier);