public async Task Test_AddedNewMGA()
        {
            var guid = System.Guid.NewGuid();
            var mga  = new MGADTO()
            {
                BusinessId = guid.ToString(), BusinessAddress = "Toronto", BusinessName = "MGA X1", BusinessPhoneNumber = "444-444-4444"
            };
            int ret = await _manager.Create(_mapper.Map <MGAEntity>(mga));

            Assert.AreEqual(1, ret);
            var newmga = await _manager.GetById(guid.ToString());

            Assert.AreEqual(mga.BusinessId, newmga.BusinessId.ToString());
            Assert.AreEqual(1, _manager.GetAll().Result.Count());
        }
        public async Task Test_AddedNewMGA()
        {
            var guid    = System.Guid.NewGuid();
            var advisor = new AdvisorDTO()
            {
                AdvisorId = guid.ToString(), Address = "Toronto", FirstName = "Advisor X1", LastName = "X1", PhoneNumber = "444-444-4444"
            };
            int ret = await _manager.Create(_mapper.Map <AdvisorEntity>(advisor));

            Assert.AreEqual(1, ret);
            var newrec = await _manager.GetById(guid.ToString());

            Assert.AreEqual(advisor.AdvisorId, newrec.AdvisorId.ToString());
            Assert.AreEqual(1, _manager.GetAll().Result.Count());
        }
        public async Task <CarrierDTO> Get(string id)
        {
            var carrier = await _carrierManager.GetById(id);

            var carriermodel = _mapper.Map <CarrierDTO>(carrier);

            return(carriermodel);
        }
        public async Task <ContractDTO> Get(string id)
        {
            var contract = await _contractsManager.GetById(id);

            var contractmodel = _mapper.Map <ContractDTO>(contract);

            return(contractmodel);
        }
Example #5
0
        public async Task <AdvisorDTO> Get(string id)
        {
            var advisor = await _advisorManager.GetById(id);

            var advisormodel = _mapper.Map <AdvisorDTO>(advisor);

            return(advisormodel);
        }
        public async Task <MGADTO> Get(string id)
        {
            var mga = await _mgamanager.GetById(id);

            var mgamodel = _mapper.Map <MGADTO>(mga);

            return(mgamodel);
        }