I have some code where in my foreach() the object attr is not null and I can see my custom value, but when I put it to my Custom DBColumnMappingAttribute it comes back null. Can someone please help me figure it out?
public static IList<PropertyInformationDTO> GetDTOAttributes<T>(Type ty)
{
IList<PropertyInformationDTO> theResults = new List<PropertyInformationDTO>();
PropertyInfo[] props = ty.GetProperties();
// PropertyInfo[] props = typeof(ty).GetProperties();
foreach (PropertyInfo prop in props)
{
object[] attrs = prop.GetCustomAttributes(true);
// I can see the attr attribute has my value of my dbcoulumnattribute that I want, but not sure how to get it?
foreach (object attr in attrs)
{
// Null is here
DBColumnMappingAttr ...
Go to the complete details ...