benjaminvr

Deprecated TableMapAttribute

Oct 8th, 2021
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. // assignment to a class
  2. [TableMap("bestuurder", new string[] {"id", "naam", "voornaam", "adres", "geboortedatum", "rijksregisternummer", "rijbewijssoort"})]
  3.  
  4. // TableMapAttribute.cs
  5. namespace BusinessLaag.Model.Attributes {
  6.     public sealed class TableMapAttribute : Attribute
  7.     {
  8.         public Dictionary<string, string[]> TableInfo { get; set; }
  9.  
  10.         public TableMapAttribute(string tableName, string[] columnNames)
  11.         {
  12.             string[] s = new string[1] { tableName };
  13.  
  14.             TableInfo = new Dictionary<string, string[]>();
  15.             TableInfo.Add("tableName", s);
  16.             TableInfo.Add("columnNames", columnNames);
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment