Пример #1
0
        //public static IMapper Mapper {get; private set;}

        #endregion

        #region Constructor

        /// <summary>
        /// Create a new instance of Alim_Fuente application service
        /// </summary>
        /// <param name="repository">Repository dependency</param>
        public Alim_FuenteAppService(IAlim_FuenteRepository repository)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository", ApplicationResources.exception_WithoutRepository);
            }
            _repositoryAlim_Fuente = repository;
        }
Пример #2
0
        /// <summary>
        /// Create a new instance of Alim_Fuente application service
        /// </summary>
        /// <param name="repository">Repository dependency</param>
        /// <param name="uow">IUnitOfWorkAsync dependency</param>
        public Alim_FuenteAppService(IAlim_FuenteRepository repository, IUnitOfWorkAsync uow)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository", ApplicationResources.exception_WithoutRepository);
            }
            _repositoryAlim_Fuente = repository;

            if (uow == null)
            {
                throw new ArgumentNullException("uow", ApplicationResources.exception_WithoutRepository);
            }
            _unitOfWorkAsync = uow;
        }