开发者

How can I prevent a field from being copied to the client proxy in WCF RIA?

开发者 https://www.devze.com 2023-02-14 23:14 出处:网络
Is there a metadata attribute I can use to prevent a field from being accessible on the client in a WCF RIA services? I sure I have seen this before, but I\'m drawing a blank and Google isn\'t helping

Is there a metadata attribute I can use to prevent a field from being accessible on the client in a WCF RIA services? I sure I have seen this before, but I'm drawing a blank and Google isn't helping. It would look something like

[MetadataType(typeof(User.UserMetadata))]
public partial class User
{
    internal sealed class UserMetadata
    {
        private UserM开发者_如何转开发etadata()
        {
        }

        public int Id { get; set; }

        [HideFromClientProxy]
        public string PasswordSalt { get; set; }
    }
}


Use the [Exclude]-Attribute


[Exclude]
public string PasswordSalt { get; set; }
0

精彩评论

暂无评论...
验证码 换一张
取 消