示例#1
0
        //public static IMapper Mapper {get; private set;}

        #endregion

        #region Constructor

        /// <summary>
        /// Create a new instance of Medida application service
        /// </summary>
        /// <param name="repository">Repository dependency</param>
        public MedidaAppService(IMedidaRepository repository)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository", ApplicationResources.exception_WithoutRepository);
            }
            _repositoryMedida = repository;
        }
示例#2
0
        /// <summary>
        /// Create a new instance of Medida application service
        /// </summary>
        /// <param name="repository">Repository dependency</param>
        /// <param name="uow">IUnitOfWorkAsync dependency</param>
        public MedidaAppService(IMedidaRepository repository, IUnitOfWorkAsync uow)
        {
            if (repository == null)
            {
                throw new ArgumentNullException("repository", ApplicationResources.exception_WithoutRepository);
            }
            _repositoryMedida = repository;

            if (uow == null)
            {
                throw new ArgumentNullException("uow", ApplicationResources.exception_WithoutRepository);
            }
            _unitOfWorkAsync = uow;
        }
示例#3
0
 public MedidaController(IAuthService authService, IMedidaRepository repository)
 {
     _authService = authService;
     _repository  = repository;
 }