IT Portal ContactsId Patch

This Patch snippet is an example of updating a Contact in IT Portal

C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.ServiceModel;

using DemoItPortal.ItPortalService;

namespace DemoItPortal
{
    class ContactsIdPatch
    {
        public static void Main()
        {
            Console.WriteLine("ContactsIdPatch: Start");

            ItPortalClient client = new ItPortalClient();
            (client.ChannelFactory.Endpoint.Binding as BasicHttpBinding).MaxReceivedMessageSize = int.MaxValue;
            (client.ChannelFactory.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue;
            (client.ChannelFactory.Endpoint.Binding as BasicHttpBinding).ReceiveTimeout = new TimeSpan(0, 10, 0);

            ContactsIdPatchRequestPath requestPath = new ContactsIdPatchRequestPath
            {
                contactId = "14433"
            };

            ContactsIdPatchRequestBody requestBody = new ContactsIdPatchRequestBody
            {
                company = new ContactsIdPatchRequestBody_company
                {
                    name = "Test Company"
                },
                firstName = "TestChange",
                middleInitial = "M",
                lastName = "TestChange",
                type = new ContactsIdPatchRequestBody_type
                {
                    name = "Users"
                }
            };

            client.ContactsIdPatch(requestPath, requestBody);

            Console.WriteLine("ContactsIdPatch: Finished");
            Console.ReadKey();
        }
    }
}