Example #1
0
        public void UpdateAssociateTest()
        {
            var associate = associatesService.GetAssociate(586790);

            associate.Name = "TestServiceAssociateUpdated";
            var assoc = associatesService.UpdateAssociate(associate);

            Assert.NotNull(assoc);
            Assert.AreEqual(assoc.Name, associate.Name);
        }
Example #2
0
        public HttpResponseMessage UpdateAssociate([FromBody] AssociateModel associate)
        {
            AssociateModel result = new AssociateModel();

            try
            {
                var input = Helper.CastObject <Associate>(associate);
                var res   = _associatesService.UpdateAssociate(input);
                result = Helper.CastObject <AssociateModel>(res);
            }
            catch (Exception ex)
            {
                _logManager.WriteLog(ex);
            }
            return(ToJson(result));
        }