Esempio n. 1
0
        public void deleteEntity(int id, string typename)
        {
            var bType = Type.GetType(typename);
            var eType = _repoFinder.Mappings.First(t => t.Item2 == bType).Item1;

            var rt       = _repoFinder.CreateRepository(eType);
            var repoType = rt.Item2;
            var repo     = rt.Item1;

            var e = repoType.GetMethod("Get").Invoke(repo, new object[] { id, Enums.LockMode.None });

            repoType.GetMethod("Delete").Invoke(repo, new[] { e });
        }
 public CustomEntityCriteria(RepositoryFinder repoFinder, ILog log,
                             NHibernateBoxTransformation <TM, TE> transformation)
 {
     _repoFinder     = repoFinder;
     _log            = log;
     _transformation = transformation;
     repo            = repoFinder.CreateRepository <TE>();
 }
Esempio n. 3
0
        public SimplePersistentAction(IDbContext context, RepositoryFinder repoFinder, ILog log)
        {
            _context    = context;
            _repoFinder = repoFinder;
            _log        = log;

            _repo = _repoFinder.CreateRepository <Entity>();
        }