Search code examples
c#petapoco

How to make a petapoco class with a name different than table name?


I have a petapoco class with a name that is equal to the table name.

i want to change the class name without changing the table name on the DB (for upgrade reasons in my application) - how can i do it?


Solution

  • just add the following:

    ...
    [TableName("YourOldName")]
    public class YourNewClassName
    {
        ...
    }