Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. class Media {
  2. public int id {get;set;}
  3. public string mediatype {get;set;}
  4. }
  5.  
  6. class Song : Media {
  7. public string album {get;set;}
  8. }
  9.  
  10. class Movie : Media {
  11. public string name {get;set;}
  12. }
  13.  
  14. create type AllMedia as table
  15. (
  16. id int,
  17. mediatype nvarchar(50),
  18. album nvarchar(50),
  19. name nvarchar(50)
  20. )
  21.  
  22. class MediaTable{
  23. public int id {get;set;}
  24. public string mediatype {get;set;}
  25. public string album {get;set;}
  26. public string name {get;set;}
  27.  
  28. public static List<MediaTable> ToMediaTable<T>(List<T> media){
  29. ...
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement