You can create a custom mediator that sets these two properties before the action is called.
Something like that:
public class CustomModelBinder : DefaultModelBinder
{
protected override void BindProperty(ControllerContext controllerContext, ModelBindingContext bindingContext, System.ComponentModel.PropertyDescriptor propertyDescriptor)
{
if ((propertyDescriptor.Name == "CreatedBy") || (propertyDescriptor.Name == "LastModifiedBy"))
{
}
base.BindProperty(controllerContext, bindingContext, propertyDescriptor);
}
}
source
share