authorization - Achieving property value assignment control using a generic approach for POCO or plain C# entity classes -
i working on .net application & trying achieve following in c#. let's assume have entity employee class below few public auto implemented properties. assume have created attribute - beforepropertyset & have annotated of entity properties - in class below. class employee { [beforepropertyset("some delegate", "some other prop value")] public string address { get; set; } public string name { get; set; } public int age { get; set; } } what want can explained of code snippet - var e = new employee(); e.address = "confidential data"; //this assignment restricted user x //whereas allowed user y e.name = "general data"; whenever assign value property, if property annotated special attribute beforepropertyset callback common function standard thing across application. example, if currentuser not expected view value being assigned new value assignment can cancelled. this approach enables me remove attribut...