c# - Web API hide field from consumer of service -


i have class - person. consumer of web api service must set id. don't want them able set or see internalid.

public class person {     [required(errormessage = "id required.")]     public string id { get; set; }      public string internalid { get; set; }   } 

other parts of application need work internalid, setting private/internal won't work.

why don't obfuscate id? have function crypting id value , de-crypting it. encrypted id public , decrypted id private.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -