public static async Task <TEntity> SomeUserRepositoryMethod <TEntity>(this IExtensionRepository <TEntity> self) where TEntity : UserModel
 {
     return(await self.GetAll().FirstOrDefaultAsync(model => model.IsTestBoolProperty));
 }
示例#2
0
 public static TEntity[] GetActive <TEntity>(this IExtensionRepository <TEntity> self) where TEntity : IActive, IModel
 {
     return(self.GetAll().Where(entity => entity.IsActive).ToArray());
 }