예제 #1
0
        // POST: api/Contact
        public async Task <bool> PostAsync([FromBody] ContactViewModelRequest request)
        {
            var sevRequest = new ContactRequest
            {
                FirstName   = request.FirstName,
                LastName    = request.LastName,
                Email       = request.Email,
                PhoneNumber = request.PhoneNumber
                ,
                IsActive = request.IsActive
            };

            //autommaper
            //var obj = _mapper.Map<ContactViewModelRequest, ContactRequest>(request);
            return(await _contactManger.AddContacts(sevRequest));
        }