private async Task <string> SeedMGAData()
        {
            var guid    = System.Guid.NewGuid();
            var advisor = new AdvisorDTO()
            {
                AdvisorId = guid.ToString(), Address = "Toronto", FirstName = "Advisor X1", LastName = "X1", PhoneNumber = "444-444-4444"
            };
            await _seedmanager.Create(_mapper.Map <AdvisorEntity>(advisor));

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

            return(guid.ToString());
        }
        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 <int> Create([FromBody] CarrierDTO carrier)
 {
     return(await _carrierManager.Create(_mapper.Map <CarrierEntity>(carrier)));
 }
 public async Task <int> Create([FromBody] ContractDTO contract)
 {
     return(await _contractsManager.Create(_mapper.Map <ContractEntity>(contract)));
 }
Пример #7
0
 public async Task <int> Create([FromBody] AdvisorDTO advisor)
 {
     return(await _advisorManager.Create(_mapper.Map <AdvisorEntity>(advisor)));
 }
Пример #8
0
 public async Task <int> Create([FromBody] MGADTO mga)
 {
     return(await _mgamanager.Create(_mapper.Map <MGAEntity>(mga)));
 }