Nepethya Rana

Nepethya Rana

  • NA
  • 335
  • 152.8k

How do i add a field that maps to my database table?

Feb 19 2016 11:14 AM

 I have a situation where I need to add a property that maps to the column of database table .

I already have an running application with property that maps the database column. example

public virtual string ChocoBarPrice { get; set; }

this maps to the column  name choco_bar_price .
 
Now I need to add another Property that needs to map with column name choco_bar_2_price.
 
This is what I did , I just added a property but I am not sure if this is right way to do it.

public virtual string ChocoBar2Price { get; set; } 

How do I do it? I would be thankful for the help. 

 
 


Answers (1)