Hide Properties on Odata Controllers responses

Hi, is there a way to hide properties from Odata EF controllers response, like using

I dont want the passwordHash property to be returned on any query related to users.


Those should be excluded by default.

    public partial class ApplicationUser : IdentityUser
        public IEnumerable<string> RoleNames { get; set; }

        public override string PasswordHash { get; set; }

        [IgnoreDataMember, NotMapped]
        public string Password { get; set; }

        [IgnoreDataMember, NotMapped]
        public string ConfirmPassword { get; set; }

Here is how the response looks like:

GET http://localhost:5000/auth/ApplicationUsers

GET http://localhost:5000/auth/ApplicationUsers('1242b847-df4a-4525-ba9d-05bd3e1d7f06')

Thanks Atanas, just to let you know, I have a custom security where I use a custom table for authentication.

How does your implementation differ from the default Radzen one? Using the IgnoreDataMember and NotMapped attributes are sufficient in the default scenario and the PasswordHash properties are not serialized by OData.