This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi: In my database we have a database called 'EW_RF' and in my model I have it named as RF ( short for radio frequency). Everything works fine, I can create and interact with RF entities and they are correctly saved to the 'EW_RF' table. The problem is the IQueryable<RF> property in the UOW is called 'Rves' i.e. public System.Linq.IQueryable<RF> Rves |
|
|
This is not currently possible I'm afraid: the IQueryable is always the plural of the entity name -- where "plural" means "Inflector's best guess at the plural," which is obviously not correct in this case. At the moment the only solution is to create a partial class for your XxxUnitOfWork class and add the RFs property yourself. This won't stop the Rves property being generated but at least it means you will have the desired API until I can improve the pluralisation algorithm and/or provide an override option. I will try to look at this today. The "pluralised table names" setting is used *only* when creating database tables using the Update Database command -- it does not affect code generation. |
|
|
Beginning with the 25 Sept nightly build, there is a "Plural Name" property on designer entities which, if specified, will be used for the LINQ IQueryable property. (If left blank, you'll get the usual inferred plural.) Note this is a code generation setting and does not affect table names even if you have "pluralised in database" turned on. Non-conventional table names must be specified through the Table Name setting. |
|
|
Always amazed by the turn around time on these questions Ivan, thanks for the great support as always. Looking forward to the new build. |
|
|
Works great, thanks Ivan. |
|