public HttpResponseMessage Post([FromBody] UserPermissionsBO[] userPermissions)
        {
            UserRoleAndPermissionsDL BL = new UserRoleAndPermissionsDL();
            var result = BL.AddUserPermissions(userPermissions);

            return(Request.CreateResponse(HttpStatusCode.OK, result, Configuration.Formatters.JsonFormatter));
        }
        public HttpResponseMessage Put([FromBody] UserPermissionsBO[] userPermissionList)
        {
            UserRoleAndPermissionsDL BL = new UserRoleAndPermissionsDL();

            foreach (var permission in userPermissionList)
            {
                if (permission.PermissionKey == Guid.Empty)
                {
                    var orderdetailCollection = BL.AddUserPermissions(permission);
                }
                else
                {
                    var orderdetailCollection = BL.UpdateUserPermissions(permission);
                }
            }
            return(Request.CreateResponse(HttpStatusCode.OK, true, Configuration.Formatters.JsonFormatter));
        }