Replace function for MVC connector