Advertisement
jhenriquecosta

ActiveRecordExampleRepository

Jul 21st, 2020
1,198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Linq.Expressions;
  5. using System.Text;
  6. using Castle.ActiveRecord;
  7. using NHibernate.Criterion;
  8. using Orion.Ceasar.Data.DTO;
  9. using Orion.Ceasar.Data.Entity;
  10. using Orion.Zeus.Util.ActiveRecord;
  11.  
  12. namespace  Orion.Ceasar.Data.Repository
  13. {
  14.     public class ImobImovelRepository: ArRepository<ImobImovel>
  15.     {
  16.         public List<ImobImovel> FindAll(Expression<Func<ImobImovel, bool>> filter)
  17.         {
  18.             using (new SessionScope(FlushAction.Never))
  19.             {
  20.                 return ImobImovel.Queryable.Where(filter).ToList();
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement