Guest User

Untitled

a guest
Nov 20th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. SqlMapper.SetTypeMap(
  2. typeof(SPL_ADV_REPORT),
  3. new CustomPropertyTypeMap(
  4. typeof(SPL_ADV_REPORT),
  5. (type, columnName) =>
  6. type.GetProperties().FirstOrDefault(prop =>
  7. prop.GetCustomAttributes(false)
  8. .OfType<ColumnAttribute>()
  9. .Any(attr => attr.Name == columnName))));
Add Comment
Please, Sign In to add comment