Assigning Case to Appropriate Team User Using Plugin in Dynamics CRM / 365
Follow companion article at http://www.c-sharpcorner.com/article/assigning-case-to-appropriate-team-user-using-plugin-in-dynamics-365-crm/
This code is a Dynamics CRM plugin which can be directly or with little modification consumed if you have similar requirement as mentioned in article.