예제 #1
0
        public NHibernateRepository(
            ISessionFactory sessionFactory,
            IGetEntitiesByIds <TEntity> getEntitiesByIds,
            IGetEntitiesBySpecification <TEntity> getEntitiesBySpecification,
            IUpsertEntity <TEntity> upsertEntity,
            IDeleteEntityById <TEntity> deleteEntityById,
            IDeleteEntityByKey <TEntity> deleteEntityByKey)
        {
            _getEntitiesByIds           = getEntitiesByIds;
            _getEntitiesBySpecification = getEntitiesBySpecification;
            _upsertEntity      = upsertEntity;
            _deleteEntityById  = deleteEntityById;
            _deleteEntityByKey = deleteEntityByKey;

            SessionFactory = sessionFactory;
        }
예제 #2
0
 public DeleteEntityModel(IDeleteEntityById <TEntityModel> repository)
 {
     _repository = repository;
 }
 /// <summary>
 /// Initializes a new instance of <see cref="DeleteEntityByIdAuthorizationDecorator{T}"/>.
 /// </summary>
 /// <param name="next">The decorated instance for which authorization is being performed.</param>
 public DeleteEntityByIdAuthorizationDecorator(IDeleteEntityById <T> next)
 {
     _next = next;
 }