public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { if (controllerContext.HttpContext.User.Identity.IsAuthenticated) { IGebruikerRepository repos = (GebruikerRepository)DependencyResolver.Current.GetService(typeof(GebruikerRepository)); return(repos.FindByUserName(HttpContext.Current.User.Identity.GetUserName())); } return(null); }