Skip to content

Instantly share code, notes, and snippets.

@rschiefer
Created June 4, 2018 17:14
Show Gist options
  • Save rschiefer/e86cdbb8012afe726acef5322996a50f to your computer and use it in GitHub Desktop.
Save rschiefer/e86cdbb8012afe726acef5322996a50f to your computer and use it in GitHub Desktop.
public class RemoteModelValidatorAttribute : RemoteAttribute
{
public RemoteModelValidatorAttribute(Type modelType, string action, string controller) :base(action, controller)
{
AdditionalFields = string.Join(",", modelType.GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance).Select(p => p.Name));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment