Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Saving any kind of object in relational database
  2. class Person{
  3.     string FirstName {get;set;}
  4.     string LastName {get;set;}
  5. }
  6.  
  7. class Product{
  8.     string Name {get;set;}
  9.     decimal Price {get;set;}
  10. }
  11.        
  12. CREATE TABLE Data
  13.    (Id int PRIMARY KEY,
  14.     TypeName nvarchar(50),
  15.     PropertyName nvarchar(50),
  16.     PropertyValue binary)
  17.        
  18. 1    Person    FirstName   Jalal
  19.  
  20. 2    Person    LastName    A.R
  21.  
  22. 3    Product   Name        Apple
  23.  
  24. 4    Product   Price       2