AnantLabs / codesmith

Automatically exported from code.google.com/p/codesmith
1 stars 0 forks source link

Plinqo is generating wrong table names: #543

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Create a table a table name that is plural, ie Users
Tell plinqo it is plural and you want it to generate singular entities.

What is the expected output? What do you see instead?
I believe what should happen is the Table Name should be plural and the entity 
name should be singular on generation:
This is what gets generated.

 [System.CodeDom.Compiler.GeneratedCode("CodeSmith", "5.0.0.0")]
 public System.Data.Linq.Table<.Users> Users
 {
     get { return GetTable<Users>(); }
 }

This is the goal
[System.CodeDom.Compiler.GeneratedCode("CodeSmith", "5.0.0.0")]
 public System.Data.Linq.Table<User> Users
 {
     get { return GetTable<User>(); }
 }

Please provide any additional information below.
If you go and edit the DBML and make it plural, generate, then make it 
singular, and generate it fixes it.

Original issue reported on code.google.com by regbra...@gmail.com on 18 Jan 2011 at 2:51

GoogleCodeExporter commented 9 years ago
Hello,

I have verified that it doesn't make this table name into a singular form.

Thanks
-Blake Niemyjski

Original comment by bniemyjski on 19 Jan 2011 at 3:52